File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,5 +171,7 @@ jobs:
171171 ./**/Summary.txt
172172 ./**/fossa.html
173173 env :
174+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
175+ DOTNET_NOLOGO : 1
174176 # https://docs.github.com/en/actions/reference/workflows-and-actions/contexts
175177 GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 7878 - name : Build .NET solution
7979 run : dotnet build --no-restore --configuration Debug
8080 shell : bash
81+ env :
82+ BUILD_SOURCEBRANCHNAME : ${{ github.ref_name }}
83+ BUILD_BUILDID : ${{ github.run_id }}
8184 - name : Run tests
8285 run : |
8386 dotnet test --no-build --verbosity normal --configuration Debug \
Original file line number Diff line number Diff line change 1717 - name : Build .NET code
1818 run : dotnet build --no-restore --configuration Debug
1919 shell : bash
20+ env :
21+ BUILD_SOURCEBRANCHNAME : ${{ github.ref_name }}
22+ BUILD_BUILDID : ${{ github.run_id }}
2023 - name : Run tests
2124 run : |
2225 dotnet test --no-build --verbosity normal --configuration Debug \
Original file line number Diff line number Diff line change 1+ name : Pack & Push
2+ description : Package .NET projects and push to the registry
3+
4+ inputs :
5+ dotnet-version :
6+ description : .NET SDK version to be used
7+ required : false
8+ default : " 10.0"
9+ registry-token :
10+ description : Registry
11+ required : true
12+ registry-address :
13+ description : Registry address (NuGet.org by default)
14+ required : false
15+ default : " https://api.nuget.org/v3/index.json"
16+ push-enabled :
17+ description : Push
18+ required : false
19+ default : " false"
20+
21+ runs :
22+ using : " composite"
23+ steps :
24+ - name : Install .NET
25+ uses : actions/setup-dotnet@v5
26+ with :
27+ dotnet-version : ${{ inputs.dotnet-version }}
28+ - name : Package
29+ # "**/*.csproj;!**/*Tests.csproj"
30+ run : dotnet pack --configuration Release -o output
31+ shell : bash
32+ env :
33+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
34+ DOTNET_NOLOGO : 1
35+ BUILD_SOURCEBRANCHNAME : ${{ github.ref_name }}
36+ BUILD_BUILDID : ${{ github.run_id }}
37+ - name : Push to registry
38+ if : ${{ inputs.push-enabled == 'true' }}
39+ # "$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg"
40+ run : for f in output/*.nupkg; do dotnet nuget push "$f" --api-key ${{ inputs.registry-token }} --source ${{ inputs.registry-address }} ; done
41+ shell : bash
You can’t perform that action at this time.
0 commit comments