44 workflow_dispatch :
55
66jobs :
7-
7+
88 Compile :
99 name : Compile
1010 uses : ./.github/workflows/build.yml
11-
11+
1212 Release :
1313 name : Release
1414 needs : Compile
@@ -17,50 +17,76 @@ jobs:
1717 Artifacts_Path : .artifacts
1818
1919 steps :
20-
2120 - name : Download Artifacts
2221 uses : actions/download-artifact@v4
2322 with :
24- merge-multiple : true
2523 path : ${{ env.Artifacts_Path }}
2624
25+ - name : Rename and Merge Artifacts
26+ run : |
27+
28+ $artifactsPath = "${{ env.Artifacts_Path }}"
29+
30+ cd $artifactsPath
31+ ls -r
32+
33+ # 遍历 artifacts 目录,根据目录名称为文件添加架构标识
34+ Get-ChildItem -Path $artifactsPath -Directory | ForEach-Object {
35+ $artifactDir = $_.FullName
36+ $dirName = $_.Name
37+
38+ if ($dirName -match "CommandLineInstaller-win-x64") {
39+ Rename-Item -Path "$artifactDir\\FluentLauncher.CommandLineInstaller.exe" `
40+ -NewName "$artifactsPath\\FluentLauncher.CommandLineInstaller-win-x64.exe"
41+ } elseif ($dirName -match "CommandLineInstaller-win-arm64") {
42+ Rename-Item -Path "$artifactDir\\FluentLauncher.CommandLineInstaller.exe" `
43+ -NewName "$artifactsPath\\FluentLauncher.CommandLineInstaller-win-arm64.exe"
44+ } elseif ($dirName -match "UniversalInstaller-win-x64") {
45+ Rename-Item -Path "$artifactDir\\FluentLauncher.UniversalInstaller.exe" `
46+ -NewName "$artifactsPath\\FluentLauncher.UniversalInstaller-win-x64.exe"
47+ } elseif ($dirName -match "UniversalInstaller-win-arm64") {
48+ Rename-Item -Path "$artifactDir\\FluentLauncher.UniversalInstaller.exe" `
49+ -NewName "$artifactsPath\\FluentLauncher.UniversalInstaller-win-arm64.exe"
50+ }
51+ }
52+
2753 - name : Generate Tag
2854 run : |
29- $releases = (gh release list --repo Xcube-Studio/FluentLauncher.Preview.Installer --limit 100 | Measure-Object -Line).Lines
30-
31- $major=1
32- $minor=0
33- $patch=0
55+ $releases = (gh release list --repo Xcube-Studio/FluentLauncher.Preview.Installer --limit 100 | Measure-Object -Line).Lines
56+
57+ $major=1
58+ $minor=0
59+ $patch=0
3460
35- $patch += $releases % 12
36- $minor += [math]::Floor($releases / 12)
37- $major += [math]::Floor($minor / 6)
38- $minor %= 6
61+ $patch += $releases % 12
62+ $minor += [math]::Floor($releases / 12)
63+ $major += [math]::Floor($minor / 6)
64+ $minor %= 6
3965
40- $version="$major.$minor.$patch"
41- echo "Generated version: $version"
42- echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
66+ $version="$major.$minor.$patch"
67+ echo "Generated version: $version"
68+ echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4369
4470 env :
4571 GH_TOKEN : ${{ github.token }}
4672
4773 - name : Create Release
48744975 with :
50- artifacts : " ${{ env.Artifacts_Path }}\\ *.*"
51- allowUpdates : true
52- generateReleaseNotes : true
53- tag : " v${{ env.version }}"
54-
76+ artifacts : " ${{ env.Artifacts_Path }}\\ *.*"
77+ allowUpdates : true
78+ generateReleaseNotes : true
79+ tag : " v${{ env.version }}"
80+
5581 - name : Upload Files To Oss
5682 uses : xcube-studio/sync2oss@v2
5783 with :
5884 repoUrl : " Xcube-Studio/FluentLauncher.Preview.Installer"
5985 accessKeyId : ${{ secrets.ALIYUN_ACCESSKEYID }}
60- accessKeySecret : ${{secrets.ALIYUN_ACCESSKEYSECRET}}
61- endpoint : ${{secrets.ALIYUN_OSS_ENDPOINT}}
62- bucketName : ${{secrets.ALIYUN_OSS_BUCKETNAME_1}}
86+ accessKeySecret : ${{ secrets.ALIYUN_ACCESSKEYSECRET }}
87+ endpoint : ${{ secrets.ALIYUN_OSS_ENDPOINT }}
88+ bucketName : ${{ secrets.ALIYUN_OSS_BUCKETNAME_1 }}
6389 region : " cn-shanghai"
6490 addSymlink : True
6591 fromRelease : True
66- remoteDir : " FluentLauncher.Preview.Installer"
92+ remoteDir : " FluentLauncher.Preview.Installer"
0 commit comments