File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,13 @@ name: CI
33on :
44 push :
55 branches : [main]
6+ tags : ['[0-9]*.*']
67 pull_request :
78 branches : [main]
9+ workflow_dispatch :
10+
11+ env :
12+ DOTNET_NOLOGO : true
813
914jobs :
1015 build :
2631 - run : just build-release
2732
2833 - run : just test-release
34+
35+ - uses : actions/upload-artifact@v4
36+ if : matrix.os == 'ubuntu-latest' && (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
37+ with :
38+ name : nuget
39+ if-no-files-found : error
40+ path : |
41+ src/CronTimer/bin/Release/*.nupkg
42+ src/CronTimer/bin/Release/*.snupkg
43+
44+ publish :
45+ needs : build
46+ if : github.event_name == 'workflow_dispatch'
47+ runs-on : ubuntu-latest
48+ permissions :
49+ id-token : write
50+ steps :
51+ - uses : actions/download-artifact@v4
52+ with :
53+ name : nuget
54+ path : artifacts
55+
56+ - uses : actions/setup-dotnet@v4
57+ with :
58+ dotnet-version : 10.x
59+
60+ - uses : NuGet/login@v1
61+ id : login
62+ with :
63+ user : ${{ secrets.NUGET_USER }}
64+
65+ - run : dotnet nuget push 'artifacts/*.nupkg' -s https://api.nuget.org/v3/index.json -k ${{ steps.login.outputs.NUGET_API_KEY }} --skip-duplicate
You can’t perform that action at this time.
0 commit comments