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,77 @@ 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+ cd ..
33+
34+ # 遍历 artifacts 目录,根据目录名称为文件添加架构标识
35+ Get-ChildItem -Path $artifactsPath -Directory | ForEach-Object {
36+ $artifactDir = $_.FullName
37+ $dirName = $_.Name
38+
39+ if ($dirName -match "CommandLineInstaller-win-x64") {
40+ Rename-Item -Path "$artifactDir\\FluentLauncher.CommandLineInstaller.exe" `
41+ -NewName "$artifactsPath\\FluentLauncher.CommandLineInstaller-win-x64.exe"
42+ } elseif ($dirName -match "CommandLineInstaller-win-arm64") {
43+ Rename-Item -Path "$artifactDir\\FluentLauncher.CommandLineInstaller.exe" `
44+ -NewName "$artifactsPath\\FluentLauncher.CommandLineInstaller-win-arm64.exe"
45+ } elseif ($dirName -match "UniversalInstaller-win-x64") {
46+ Rename-Item -Path "$artifactDir\\FluentLauncher.UniversalInstaller.exe" `
47+ -NewName "$artifactsPath\\FluentLauncher.UniversalInstaller-win-x64.exe"
48+ } elseif ($dirName -match "UniversalInstaller-win-arm64") {
49+ Rename-Item -Path "$artifactDir\\FluentLauncher.UniversalInstaller.exe" `
50+ -NewName "$artifactsPath\\FluentLauncher.UniversalInstaller-win-arm64.exe"
51+ }
52+ }
53+
2754 - name : Generate Tag
2855 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
56+ $releases = (gh release list --repo Xcube-Studio/FluentLauncher.Preview.Installer --limit 100 | Measure-Object -Line).Lines
57+
58+ $major=1
59+ $minor=0
60+ $patch=0
3461
35- $patch += $releases % 12
36- $minor += [math]::Floor($releases / 12)
37- $major += [math]::Floor($minor / 6)
38- $minor %= 6
62+ $patch += $releases % 12
63+ $minor += [math]::Floor($releases / 12)
64+ $major += [math]::Floor($minor / 6)
65+ $minor %= 6
3966
40- $version="$major.$minor.$patch"
41- echo "Generated version: $version"
42- echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
67+ $version="$major.$minor.$patch"
68+ echo "Generated version: $version"
69+ echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4370
4471 env :
4572 GH_TOKEN : ${{ github.token }}
4673
4774 - name : Create Release
48754976 with :
50- artifacts : " ${{ env.Artifacts_Path }}\\ *.*"
51- allowUpdates : true
52- generateReleaseNotes : true
53- tag : " v${{ env.version }}"
54-
77+ artifacts : " ${{ env.Artifacts_Path }}\\ *.*"
78+ allowUpdates : true
79+ generateReleaseNotes : true
80+ tag : " v${{ env.version }}"
81+
5582 - name : Upload Files To Oss
5683 uses : xcube-studio/sync2oss@v2
5784 with :
5885 repoUrl : " Xcube-Studio/FluentLauncher.Preview.Installer"
5986 accessKeyId : ${{ secrets.ALIYUN_ACCESSKEYID }}
60- accessKeySecret : ${{secrets.ALIYUN_ACCESSKEYSECRET}}
61- endpoint : ${{secrets.ALIYUN_OSS_ENDPOINT}}
62- bucketName : ${{secrets.ALIYUN_OSS_BUCKETNAME_1}}
87+ accessKeySecret : ${{ secrets.ALIYUN_ACCESSKEYSECRET }}
88+ endpoint : ${{ secrets.ALIYUN_OSS_ENDPOINT }}
89+ bucketName : ${{ secrets.ALIYUN_OSS_BUCKETNAME_1 }}
6390 region : " cn-shanghai"
6491 addSymlink : True
6592 fromRelease : True
66- remoteDir : " FluentLauncher.Preview.Installer"
93+ remoteDir : " FluentLauncher.Preview.Installer"
0 commit comments