Skip to content

Commit 10aec23

Browse files
committed
更新workflow,部署NET 9
1 parent e8fe050 commit 10aec23

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

.github/workflows/release.yml

+23-22
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,49 @@ on:
88
jobs:
99
release:
1010
runs-on: windows-latest
11+
env:
12+
dotnet_version: '9.x.x' # Extracted variable for .NET version
13+
dotnet_target: 'net9.0-windows10.0.26100' # Extracted variable for target framework version
14+
1115
steps:
1216
- name: Checkout source
1317
uses: actions/checkout@v4
14-
18+
1519
- name: Setup .NET
1620
uses: actions/setup-dotnet@v4
1721
with:
18-
dotnet-version: '8.x.x'
19-
22+
dotnet-version: ${{ env.dotnet_version }} # Using the extracted .NET version
23+
2024
- name: Publish-arm64
2125
run: dotnet publish /p:RuntimeIdentifier=win-arm64
2226
- name: Rename-arm64
23-
run: Rename-Item -Path ./Mikoto/bin/Release/net8.0-windows/win-arm64/publish -NewName mikoto-arm64
27+
run: Rename-Item -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-arm64/publish -NewName mikoto-arm64
2428
- name: Zip-arm64
25-
run: Compress-Archive -Path ./Mikoto/bin/Release/net8.0-windows/win-arm64/mikoto-arm64 -Destination mikoto-arm64.zip
26-
29+
run: Compress-Archive -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-arm64/mikoto-arm64 -Destination mikoto-arm64.zip
2730

2831
- name: Publish-x64
2932
run: dotnet publish /p:RuntimeIdentifier=win-x64
3033
- name: Rename-x64
31-
run: Rename-Item -Path ./Mikoto/bin/Release/net8.0-windows/win-x64/publish -NewName mikoto-64bit
34+
run: Rename-Item -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-x64/publish -NewName mikoto-64bit
3235
- name: Zip-x64
33-
run: Compress-Archive -Path ./Mikoto/bin/Release/net8.0-windows/win-x64/mikoto-64bit -Destination mikoto-64bit.zip
34-
35-
36+
run: Compress-Archive -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-x64/mikoto-64bit -Destination mikoto-64bit.zip
37+
3638
- name: Publish-x86
3739
run: dotnet publish /p:RuntimeIdentifier=win-x86
3840
- name: Rename-x86
39-
run: Rename-Item -Path ./Mikoto/bin/Release/net8.0-windows/win-x86/publish -NewName mikoto-32bit
41+
run: Rename-Item -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-x86/publish -NewName mikoto-32bit
4042
- name: Zip-x86
41-
run: Compress-Archive -Path ./Mikoto/bin/Release/net8.0-windows/win-x86/mikoto-32bit -Destination mikoto-32bit.zip
42-
43+
run: Compress-Archive -Path ./Mikoto/bin/Release/${{ env.dotnet_target }}/win-x86/mikoto-32bit -Destination mikoto-32bit.zip
4344

4445
- name: Create Release and Upload Release Asset
4546
uses: softprops/action-gh-release@v2
4647
with:
47-
tag_name: ${{ github.ref }}
48-
name: Release ${{ github.ref }}
49-
body: TODO New Release.
50-
draft: true
51-
prerelease: false
52-
files: |
53-
mikoto-arm64.zip
54-
mikoto-32bit.zip
55-
mikoto-64bit.zip
48+
tag_name: ${{ github.ref }}
49+
name: Release ${{ github.ref }}
50+
body: TODO New Release.
51+
draft: true
52+
prerelease: false
53+
files: |
54+
mikoto-arm64.zip
55+
mikoto-64bit.zip
56+
mikoto-32bit.zip

0 commit comments

Comments
 (0)