55 branches : [ main ]
66
77jobs :
8- build :
9- runs-on : ubuntu-latest
10- strategy :
11- matrix :
12- runtime : [win-x64, osx-x64, osx-arm64, linux-x64]
13-
14- steps :
15- - name : Checkout repository
16- uses : actions/checkout@v3
17-
18- - name : Setup .NET 9 SDK
19- uses : actions/setup-dotnet@v3
20- with :
21- dotnet-version : ' 9.0.x'
22-
23- - name : Restore dependencies
24- run : dotnet restore
25-
26- - name : Publish single-file executable for ${{ matrix.runtime }}
27- run : |
28- dotnet publish src/CLI -c Release -r ${{ matrix.runtime }} --self-contained true /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true -o ./publish/${{ matrix.runtime }}
29-
30- - name : Upload artifact for ${{ matrix.runtime }}
31- uses : actions/upload-artifact@v4
32- with :
33- name : DrumMidiRemapper-${{ matrix.runtime }}
34- path : ./publish/${{ matrix.runtime }}
8+ build :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ runtime : [win-x64, osx-x64, osx-arm64, linux-x64]
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v3
17+
18+ - name : Setup .NET 9 SDK
19+ uses : actions/setup-dotnet@v3
20+ with :
21+ dotnet-version : ' 9.0.x'
22+
23+ - name : Restore dependencies
24+ run : dotnet restore
25+
26+ - name : Publish single-file executable for ${{ matrix.runtime }}
27+ run : |
28+ dotnet publish src/CLI -c Release -r ${{ matrix.runtime }} --self-contained true /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true -o ./publish/${{ matrix.runtime }}
29+
30+ - name : Upload artifact for ${{ matrix.runtime }}
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : DrumMidiRemapper-${{ matrix.runtime }}
34+ path : ./publish/${{ matrix.runtime }}
35+
36+ release :
37+ needs : build
38+ runs-on : ubuntu-latest
39+ if : github.ref == 'refs/heads/main'
40+ steps :
41+ - name : Download all artifacts
42+ uses : actions/download-artifact@v4
43+ with :
44+ path : ./artifacts
45+
46+ - name : Create GitHub Release
47+ id : create_release
48+ uses : softprops/action-gh-release@v2
49+ with :
50+ tag_name : ${{ github.sha }}
51+ name : Release ${{ github.sha }}
52+ draft : false
53+ prerelease : false
54+ files : ./artifacts/**/*
55+ env :
56+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments