Skip to content

Commit 4277295

Browse files
authored
Merge pull request #9 from StarryXYJ/dev
再次测试修复
2 parents b0e28f2 + 1d84e63 commit 4277295

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25+
- name: Fetch all tags
26+
run: git fetch --tags
27+
28+
- name: Show current tag
29+
run: git describe --tags
30+
2531
- name: Setup .NET
2632
uses: actions/setup-dotnet@v4
2733
with:
@@ -55,9 +61,6 @@ jobs:
5561
- name: Run tests
5662
run: dotnet test src/AutoSettingUI.Generator.Tests/AutoSettingUI.Generator.Tests.csproj --configuration Release --no-build --verbosity minimal
5763

58-
- name: Create artifacts directory
59-
run: mkdir -p artifacts
60-
6164
- name: Pack Core
6265
run: dotnet pack src/AutoSettingUI.Core/AutoSettingUI.Core.csproj --configuration Release --no-build --output artifacts
6366

@@ -77,11 +80,11 @@ jobs:
7780
run: dotnet pack src/Extensions/AutoSettingUI.WPF/AutoSettingUI.WPF.csproj --configuration Release --no-build --output artifacts
7881

7982
- name: List packages
80-
run: ls artifacts
83+
run: Get-ChildItem artifacts -Filter *.nupkg
8184

8285
- name: Publish to NuGet
8386
if: startsWith(github.ref, 'refs/tags/v')
84-
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
87+
run: Get-ChildItem artifacts -Filter *.nupkg | ForEach-Object { dotnet nuget push $_.FullName --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate }
8588

8689
- name: Upload artifacts
8790
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)