File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 build :
1313 name : Build Package
1414 runs-on : ubuntu-latest
15- permissions :
16- contents : read
17- packages : write
18- attestations : write
19- id-token : write
2015 defaults :
2116 run :
2217 working-directory : ./src
2823 dotnet-version : 10.x.x
2924 - name : Package
3025 run : dotnet pack --configuration Release -p:PackageVersion=${{ github.ref_name }} --output .
26+ - name : Upload package artifact
27+ uses : actions/upload-artifact@v4
28+ with :
29+ name : nupkg
30+ path : src/*.nupkg
31+
32+ publish-github :
33+ name : Publish to GitHub packages
34+ needs : build
35+ runs-on : ubuntu-latest
36+ permissions :
37+ contents : read
38+ packages : write
39+ attestations : write
40+ id-token : write
41+ steps :
42+ - name : Download package artifact
43+ uses : actions/download-artifact@v4
44+ with :
45+ name : nupkg
3146 - name : Publish to GitHub packages
3247 run : dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source ${{ env.PACKAGES_URL }}/${{ github.repository_owner }}/index.json
48+
49+ publish-nuget :
50+ name : Publish to NuGet
51+ needs : build
52+ runs-on : ubuntu-latest
53+ steps :
54+ - name : Download package artifact
55+ uses : actions/download-artifact@v4
56+ with :
57+ name : nupkg
3358 - name : Publish to NuGet
3459 run : dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
You can’t perform that action at this time.
0 commit comments