Release #7
Workflow file for this run
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
name: Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet-platform: [linux-x64, win-x64, osx-x64, osx-arm64] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build self-contained binary | |
run: dotnet publish -r ${{ matrix.dotnet-platform }} -p:PublishSingleFile=true --self-contained true | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: artifact_${{ matrix.dotnet-platform }} | |
path: | | |
./**/${{ matrix.dotnet-platform }}/publish/* | |
!./**/*.pdb | |
if-no-files-found: error | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet-platform: [linux-x64, win-x64, osx-x64] | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: artifact_${{ matrix.dotnet-platform }} | |
path: artifact | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Find artifact | |
id: find_artifact | |
run: echo "::set-output name=artifact_path::$(find artifact -type f)" | |
- name: Create zip archive | |
run: zip -j guitarprotomidi_${{ matrix.dotnet-platform }}.zip ${{ steps.find_artifact.outputs.artifact_path }} | |
- name: Upload release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: guitarprotomidi_${{ matrix.dotnet-platform }}.zip | |
asset_name: guitarprotomidi_${{ matrix.dotnet-platform }}.zip | |
asset_content_type: application/zip |