File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- pull_request :
8- branches :
9- - main
7+ - develop
8+ tags :
9+ - ' release/v*'
10+ pull_request : {}
1011 workflow_dispatch :
1112
1213jobs :
1314 build-and-publish :
14- runs-on : ubuntu-latest
15+ runs-on : ubuntu-latest
1516 steps :
16- - uses : actions/checkout@v2
17+ - uses : actions/checkout@v3
1718 - name : Setup .NET
18- uses : actions/setup-dotnet@v1
19+ uses : actions/setup-dotnet@v3
1920 with :
2021 dotnet-version : 8.0.x
22+ - name : Restore
23+ run : dotnet restore
2124 - name : Build
22- run : dotnet build --configuration Release
25+ run : dotnet build --configuration Release --no-restore
2326 - name : Pack
2427 run : dotnet pack --no-build --configuration Release PAYNLSDK/PayNLSdk.csproj --output .
2528 - name : Push Nuget
26- if : ${{ github.ref == 'refs/heads/main' }}
27- run : |
28- dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_PUBLISH_KEY }} --skip-duplicate
29- dotnet nuget push *.snupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_PUBLISH_KEY }} --skip-duplicate
29+ if : ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/release/v') }}
30+ env :
31+ NUGET_API_KEY : ${{ secrets.NUGET_PUBLISH_KEY }}
32+ run : |
33+ dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
34+ dotnet nuget push *.snupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
You can’t perform that action at this time.
0 commit comments