Skip to content

Commit faa5749

Browse files
committed
build: replace custom BuildConfig task with BuildKonfig
- Add BuildKonfig plugin and dependency - Remove manual JVM BuildConfig generation task and logic - Configure BuildKonfig to generate VERSION_NAME - Update version reference from BuildConfig to BuildKonfig
1 parent dcc1430 commit faa5749

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/build-desktop.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ jobs:
5959
echo "sentry_dns=$SENTRY_DNS" >> composeApp/src/jvmMain/resources/props.properties
6060
echo "version=$VERSION" >> composeApp/src/jvmMain/resources/props.properties
6161
62+
- name: Normalize version
63+
shell: bash
64+
run: |
65+
RAW_TAG="${GITHUB_REF_NAME}"
66+
VERSION="${RAW_TAG#v}"
67+
echo "APP_VERSION=$VERSION" >> $GITHUB_ENV
68+
6269
- name: Build native packages
6370
run: ./gradlew packageReleaseDistributionForCurrentOS --stacktrace
6471

@@ -67,15 +74,15 @@ jobs:
6774
if: matrix.format == 'macos-arm'
6875
run: |
6976
FILE=$(find composeApp/build/compose/binaries -name "*.dmg" -type f)
70-
NEW="DevAnalyzer-${{ github.ref_name }}-macos-arm64.dmg"
77+
NEW="DevAnalyzer-${{ env.APP_VERSION }}-macos-arm64.dmg"
7178
mv "$FILE" "$(dirname "$FILE")/$NEW"
7279
7380
# macOS Intel
7481
- name: Rename macOS Intel DMG
7582
if: matrix.format == 'macos-intel'
7683
run: |
7784
FILE=$(find composeApp/build/compose/binaries -name "*.dmg" -type f)
78-
NEW="DevAnalyzer-${{ github.ref_name }}-macos-x64.dmg"
85+
NEW="DevAnalyzer-${{ env.APP_VERSION }}-macos-x64.dmg"
7986
mv "$FILE" "$(dirname "$FILE")/$NEW"
8087
8188
# Windows
@@ -84,15 +91,15 @@ jobs:
8491
shell: pwsh
8592
run: |
8693
$file = Get-ChildItem -Recurse -Filter *.msi -Path "composeApp/build/compose/binaries" | Select-Object -First 1
87-
$newName = "DevAnalyzer-${{ github.ref_name }}-windows-x64.msi"
94+
$newName = "DevAnalyzer-${{ env.APP_VERSION }}-windows-x64.msi"
8895
Rename-Item -Path $file.FullName -NewName $newName
8996
9097
# Linux
9198
- name: Rename Linux DEB
9299
if: matrix.format == 'linux'
93100
run: |
94101
FILE=$(find composeApp/build/compose/binaries -name "*.deb" -type f)
95-
NEW="DevAnalyzer-${{ github.ref_name }}-linux-amd64.deb"
102+
NEW="DevAnalyzer-${{ env.APP_VERSION }}-linux-amd64.deb"
96103
mv "$FILE" "$(dirname "$FILE")/$NEW"
97104
98105
# Upload renamed artifacts

0 commit comments

Comments
 (0)