-
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
1 parent
555a9c8
commit 4a47115
Showing
3 changed files
with
106 additions
and
9 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
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
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,97 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- "Build Linux" | ||
- "Build MacOS" | ||
types: | ||
- completed | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get Current Git Commit | ||
id: git_commit | ||
run: echo "::set-output name=hash::$(git rev-parse HEAD)" | ||
|
||
- name: Download Linux Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: linux-x86_64 | ||
path: artifacts/linux-x86_64 | ||
|
||
- name: Download MacOS x86_64 Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: macos-x86_64 | ||
path: artifacts/macos-x86_64 | ||
|
||
- name: Download MacOS arm64 Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: macos-arm64 | ||
path: artifacts/macos-arm64 | ||
|
||
- name: Download MacOS Universal Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: macos-universal | ||
path: artifacts/macos-universal | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.git_commit.outputs.hash }} | ||
release_name: Release ${{ steps.git_commit.outputs.hash }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Linux Build Artifact to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/linux-x86_64/lib | ||
asset_name: linux-x86_64-lib.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload MacOS x86_64 Build Artifact to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/macos-x86_64/lib | ||
asset_name: macos-x86_64-lib.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload MacOS arm64 Build Artifact to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/macos-arm64/lib | ||
asset_name: macos-arm64-lib.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload MacOS Universal Build Artifact to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/macos-universal/lib | ||
asset_name: macos-universal-lib.zip | ||
asset_content_type: application/zip |