Skip to content

Commit dcb02ab

Browse files
committed
refractor: Standardize artifact naming in desktop build workflow
1 parent dca1793 commit dcb02ab

File tree

1 file changed

+41
-8
lines changed

1 file changed

+41
-8
lines changed

.github/workflows/build-desktop.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@ jobs:
1515
# macOS ARM (Apple Silicon)
1616
- os: macos-latest
1717
format: macos-arm
18+
arch_label: macos-arm64
1819
gradle_task: packageReleaseDistributionForCurrentOS
1920

2021
# macOS Intel (x64)
2122
- os: macos-15-intel
2223
format: macos-intel
24+
arch_label: macos-x64
2325
gradle_task: packageReleaseDistributionForCurrentOS
2426

2527
# Windows
2628
- os: windows-latest
2729
format: windows
30+
arch_label: windows-x64
2831
gradle_task: packageReleaseDistributionForCurrentOS
2932

3033
# Linux
3134
- os: ubuntu-latest
3235
format: linux
36+
arch_label: linux-amd64
3337
gradle_task: packageReleaseDistributionForCurrentOS
3438

3539
steps:
@@ -47,16 +51,45 @@ jobs:
4751
run: chmod +x gradlew
4852

4953
- name: Build native packages
50-
run: ./gradlew ${{ matrix.gradle_task }} --stacktrace
54+
run: ./gradlew ${{ matrix.gradle_task }} packageUberJarForCurrentOS --stacktrace
5155

56+
- name: Rename macOS ARM DMG
57+
if: matrix.format == 'macos-arm'
58+
run: |
59+
FILE=$(find composeApp/build/compose/binaries -name "*.dmg" -type f)
60+
NEW="DevAnalyzer-${{ github.ref_name }}-macos-arm64.dmg"
61+
mv "$FILE" "$(dirname "$FILE")/$NEW"
62+
63+
- name: Rename macOS Intel DMG
64+
if: matrix.format == 'macos-intel'
65+
run: |
66+
FILE=$(find composeApp/build/compose/binaries -name "*.dmg" -type f)
67+
NEW="DevAnalyzer-${{ github.ref_name }}-macos-x64.dmg"
68+
mv "$FILE" "$(dirname "$FILE")/$NEW"
69+
70+
- name: Rename Windows MSI
71+
if: matrix.format == 'windows'
72+
run: |
73+
FILE=$(find composeApp/build/compose/binaries -name "*.msi" -type f)
74+
NEW="DevAnalyzer-${{ github.ref_name }}-windows-x64.msi"
75+
mv "$FILE" "$(dirname "$FILE")/$NEW"
76+
77+
- name: Rename Linux DEB
78+
if: matrix.format == 'linux'
79+
run: |
80+
FILE=$(find composeApp/build/compose/binaries -name "*.deb" -type f)
81+
NEW="DevAnalyzer-${{ github.ref_name }}-linux-amd64.deb"
82+
mv "$FILE" "$(dirname "$FILE")/$NEW"
83+
84+
# Upload renamed artifacts
5285
- name: Upload artifact
5386
uses: actions/upload-artifact@v4
5487
with:
5588
name: build-${{ matrix.format }}
5689
path: |
57-
composeApp/build/compose/binaries/**/dmg/*
58-
composeApp/build/compose/binaries/**/deb/*
59-
composeApp/build/compose/binaries/**/msi/*
90+
composeApp/build/compose/binaries/**/dmg/*.dmg
91+
composeApp/build/compose/binaries/**/deb/*.deb
92+
composeApp/build/compose/binaries/**/msi/*.msi
6093
6194
release:
6295
name: Create GitHub Release
@@ -76,10 +109,10 @@ jobs:
76109
uses: softprops/action-gh-release@v2
77110
with:
78111
files: |
79-
artifacts/build-macos-arm/main-release/dmg/*.dmg
80-
artifacts/build-macos-intel/main-release/dmg/*.dmg
81-
artifacts/build-windows/main-release/msi/*.msi
82-
artifacts/build-linux/main-release/deb/*.deb
112+
artifacts/build-macos-arm/**/*.dmg
113+
artifacts/build-macos-intel/**/*.dmg
114+
artifacts/build-windows/**/*.msi
115+
artifacts/build-linux/**/*.deb
83116
draft: true
84117
tag_name: ${{ github.ref_name }}
85118
env:

0 commit comments

Comments
 (0)