-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build commit | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Select Xcode 12 | ||
run: sudo xcode-select -s /Applications/Xcode_12.app | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: "SoulverCore-${{ github.sha }}.alfredworkflow" | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: .build/SoulverCore.alfredworkflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Release version | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
build_and_upload: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | ||
|
||
- name: Select Xcode 12 | ||
run: sudo xcode-select -s /Applications/Xcode_12.app | ||
|
||
- name: Build | ||
run: make | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
commitish: ${{ github.sha }} | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: .build/SoulverCore.alfredworkflow | ||
asset_name: | ||
"SoulverCore-${{ steps.get_version.outputs.version }}.alfredworkflow" | ||
asset_content_type: application/zip |