Skip to content

Commit f2de6f4

Browse files
authored
chore(Action): update pack action (#6991)
* revert: 更新语言版本 * refactor: 增加自定义参数 * chore: 增加 props 引用 * refactor: 更新 pack 提高运行效率 * refactor: 撤销分支
1 parent d28cda3 commit f2de6f4

File tree

3 files changed

+7
-44
lines changed

3 files changed

+7
-44
lines changed

.github/workflows/pack.yml

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,7 @@ on:
88
- hotfix
99

1010
jobs:
11-
NET9:
12-
runs-on: ubuntu-latest
13-
permissions:
14-
id-token: write
15-
contents: read
16-
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- name: Setup .NET Core SDK
21-
uses: actions/setup-dotnet@v4
22-
with:
23-
dotnet-version: 9.0.x
24-
25-
- name: Cache NuGet packages
26-
uses: actions/cache@v4
27-
with:
28-
path: ~/.nuget/packages
29-
key: ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}}
30-
restore-keys: |
31-
${{runner.os}}-nuget-bb-
32-
33-
- name: Restore dependencies
34-
run: dotnet restore src/BootstrapBlazor
35-
36-
- name: NuGet login
37-
uses: NuGet/login@v1
38-
id: login
39-
with:
40-
user: ${{ secrets.NUGET_USER }}
41-
42-
- name: Publish to Nuget
43-
env:
44-
NUGET_API_KEY: ${{steps.login.outputs.NUGET_API_KEY}}
45-
Bundle: True
46-
47-
run: |
48-
dotnet build src/BootstrapBlazor
49-
dotnet pack src/BootstrapBlazor -c Release -o publish
50-
dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
51-
52-
NET10:
11+
pack:
5312
runs-on: ubuntu-latest
5413
permissions:
5514
id-token: write
@@ -87,5 +46,8 @@ jobs:
8746

8847
run: |
8948
dotnet build src/BootstrapBlazor
90-
dotnet pack src/BootstrapBlazor -c Release -o publish
49+
dotnet pack src/BootstrapBlazor -c Release -o publish -p:VisualStudioVersion='17.0'
50+
dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
51+
rm -f publish/BootstrapBlazor.*.nupkg
52+
dotnet pack src/BootstrapBlazor -c Release -o publish -p:VisualStudioVersion='18.0'
9153
dotnet nuget push publish/BootstrapBlazor.*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate

BootstrapBlazor.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Folder Name="/configuration/">
1010
<File Path=".editorconfig" />
1111
<File Path=".gitignore" />
12+
<File Path="Directory.Build.props" />
1213
<File Path="exclusion.dic" />
1314
<File Path="Framework.props" />
1415
<File Path="Version.props" />

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<PropertyGroup>
14-
<LangVersion>preview</LangVersion>
14+
<LangVersion>latest</LangVersion>
1515
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
1616
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
1717
</PropertyGroup>

0 commit comments

Comments
 (0)