File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Package to Nuget
2+
3+ on :
4+ push :
5+ branches :
6+ - pack
7+ - release
8+ - hotfix
9+ - action
10+
11+ jobs :
12+ pack :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ id-token : write
16+ contents : read
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Setup .NET Core SDK
22+ uses : actions/setup-dotnet@v4
23+ with :
24+ dotnet-version : 9.0.x
25+
26+ - name : Cache NuGet packages
27+ uses : actions/cache@v4
28+ with :
29+ path : ~/.nuget/packages
30+ key : ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}}
31+ restore-keys : |
32+ ${{runner.os}}-nuget-bb-
33+
34+ - name : Restore dependencies
35+ run : dotnet restore src/BootstrapBlazor
36+
37+ - name : NuGet login
38+ uses : NuGet/login@v1
39+ id : login
40+ with :
41+ user : ${{ secrets.NUGET_USER }}
42+
43+ - name : Publish to Nuget
44+ env :
45+ NUGET_API_KEY : ${{steps.login.outputs.NUGET_API_KEY}}
46+ Bundle : True
47+
48+ run : |
49+ dotnet build src/BootstrapBlazor
50+ dotnet pack src/BootstrapBlazor -c Release -o publish
51+ dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
You can’t perform that action at this time.
0 commit comments