forked from alexsteb/GuitarPro-to-Midi
-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (58 loc) · 1.88 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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