File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44name : Release
55
66on :
7- push :
8- branches : [ "main" ]
9- pull_request :
10- branches : [ "main" ]
7+ release :
8+ types : [published]
119
1210jobs :
13- build :
11+ release :
1412 runs-on : ubuntu-latest
1513
1614 steps :
@@ -19,23 +17,21 @@ jobs:
1917 uses : actions/setup-dotnet@v4
2018 with :
2119 dotnet-version : 8.0.x
22- - name : Restore dependencies
23- run : dotnet restore
24- - name : Build
20+ - name : Publish
2521 run : |
26- dotnet build --no-restore
2722 dotnet publish src -r win-x64
2823 dotnet publish src -r osx-x64
2924 dotnet publish src -r osx-arm64
30- - name : Test
31- run : dotnet test --no-build --verbosity normal
3225 - name : Zip artifacts
3326 run : |
34- 7z a "livetagger-win-x64.zip" "./src/bin/Release/net8.0/win-x64/publish/*"
35- 7z a "livetagger-osx-x64.zip" "./src/bin/Release/net8.0/osx-x64/publish/*"
36- 7z a "livetagger-osx-arm64.zip" "./src/bin/Release/net8.0/osx-arm64/publish/*"
37- - uses : actions/upload-artifact@v3
38- with :
39- name : binaries
40- path : livetagger*.zip
27+ tag=$(git describe --tags --abbrev=0)
4128
29+ 7z a "livetagger-$tag-win-x64.zip" "./src/bin/Release/net8.0/win-x64/publish/*"
30+ 7z a "livetagger-$tag-osx-x64.zip" "./src/bin/Release/net8.0/osx-x64/publish/*"
31+ 7z a "livetagger-$tag-osx-arm64.zip" "./src/bin/Release/net8.0/osx-arm64/publish/*"
32+ - name : Publish
33+ uses : softprops/action-gh-release@v2
34+ with :
35+ files : " livetagger*"
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments