File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 # Native AOT tests
2525 - run : dotnet publish -r linux-x64 tests/ConsoleAppFramework.NativeAotTests/ConsoleAppFramework.NativeAotTests.csproj
2626 - run : tests/ConsoleAppFramework.NativeAotTests/bin/Release/net10.0/linux-x64/publish/ConsoleAppFramework.NativeAotTests
27-
2827 - run : dotnet pack -c Release --no-build -p:IncludeSymbols=true -o $GITHUB_WORKSPACE/artifacts
Original file line number Diff line number Diff line change 1616 build-dotnet :
1717 permissions :
1818 contents : read
19+ id-token : write # required for NuGet Trusted Publish
1920 runs-on : ubuntu-24.04
2021 timeout-minutes : 10
2122 steps :
@@ -26,13 +27,23 @@ jobs:
2627 # Native AOT tests
2728 - run : dotnet publish -r linux-x64 tests/ConsoleAppFramework.NativeAotTests/ConsoleAppFramework.NativeAotTests.csproj
2829 - run : tests/ConsoleAppFramework.NativeAotTests/bin/Release/net10.0/linux-x64/publish/ConsoleAppFramework.NativeAotTests
29- # pack nuget
30- - run : dotnet pack -c Release --no-build -p:Version=${{ inputs.tag }} -o ./publish
30+ # pack nuget (.nupkg and .symbols.nupkg will be created)
31+ - run : dotnet pack -c Release --no-build -p:Version=${{ inputs.tag }} -p:IncludeSymbols=true - o ./publish
3132 - uses : Cysharp/Actions/.github/actions/upload-artifact@main
3233 with :
3334 name : nuget
3435 path : ./publish
3536 retention-days : 1
37+ # push nuget
38+ - name : NuGet login (OIDC)
39+ uses : NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
40+ id : login
41+ with :
42+ user : ${{ secrets.NUGET_USER }}
43+ - run : dotnet nuget push "./publish/*.nupkg" --skip-duplicate -s https://api.nuget.org/v3/index.json -k "${NUGET_KEY}"
44+ if : ${{ !inputs.dry-run }}
45+ env :
46+ NUGET_KEY : ${{ steps.login.outputs.NUGET_API_KEY }}
3647
3748 # release
3849 create-release :
4556 commit-id : ${{ github.sha }}
4657 dry-run : ${{ inputs.dry-run }}
4758 tag : ${{ inputs.tag }}
48- nuget-push : true
59+ nuget-push : false
4960 secrets : inherit
You can’t perform that action at this time.
0 commit comments