Skip to content

Commit 57de3f9

Browse files
committed
refactor: 更新 pack 提高运行效率
1 parent 45a0bcb commit 57de3f9

File tree

1 file changed

+3
-41
lines changed

1 file changed

+3
-41
lines changed

.github/workflows/pack.yml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- refactor-action
1010

1111
jobs:
12-
NET9:
12+
pack:
1313
runs-on: ubuntu-latest
1414
permissions:
1515
id-token: write
@@ -49,44 +49,6 @@ jobs:
4949
dotnet build src/BootstrapBlazor
5050
dotnet pack src/BootstrapBlazor -c Release -o publish -p:VisualStudioVersion='17.0'
5151
dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
52-
53-
NET10:
54-
runs-on: ubuntu-latest
55-
permissions:
56-
id-token: write
57-
contents: read
58-
59-
steps:
60-
- uses: actions/checkout@v4
61-
62-
- name: Setup .NET Core SDK
63-
uses: actions/setup-dotnet@v4
64-
with:
65-
dotnet-version: 10.0.x
66-
67-
- name: Cache NuGet packages
68-
uses: actions/cache@v4
69-
with:
70-
path: ~/.nuget/packages
71-
key: ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}}
72-
restore-keys: |
73-
${{runner.os}}-nuget-bb-
74-
75-
- name: Restore dependencies
76-
run: dotnet restore src/BootstrapBlazor
77-
78-
- name: NuGet login
79-
uses: NuGet/login@v1
80-
id: login
81-
with:
82-
user: ${{ secrets.NUGET_USER }}
83-
84-
- name: Publish to Nuget
85-
env:
86-
NUGET_API_KEY: ${{steps.login.outputs.NUGET_API_KEY}}
87-
Bundle: True
88-
89-
run: |
90-
dotnet build src/BootstrapBlazor
91-
dotnet pack src/BootstrapBlazor -c Release -o publish
52+
rm -f publish/BootstrapBlazor.*.nupkg
53+
dotnet pack src/BootstrapBlazor -c Release -o publish -p:VisualStudioVersion='18.0'
9254
dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate

0 commit comments

Comments
 (0)