Skip to content

Commit dd6aa31

Browse files
committed
refactor: 更新 action
1 parent 20034c6 commit dd6aa31

File tree

2 files changed

+43
-52
lines changed

2 files changed

+43
-52
lines changed

.github/workflows/pack.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,51 @@ on:
66
- pack
77
- release
88
- hotfix
9+
- action
910

1011
jobs:
11-
pack:
12+
NET9:
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
52+
53+
NET10:
1254
runs-on: ubuntu-latest
1355
permissions:
1456
id-token: write

.github/workflows/pack9.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)