Skip to content

Commit 3e80811

Browse files
committed
refactor: Streamline GitHub Actions release workflow
This commit refactors the `build-desktop.yml` GitHub Actions workflow to improve the artifact handling and release process. - **Workflow Structure:** Separates the build and release steps into two distinct jobs (`build` and `release`). The `release` job now depends on the successful completion of the `build` job. - **Artifact Handling:** - The `build` job now uploads artifacts using a more specific path: `composeApp/build/compose/binaries/main/${{ matrix.format }}/`. - The `release` job first downloads all build artifacts from the preceding job before creating the GitHub Release. - **Release Process:** The `softprops/action-gh-release` step is updated to correctly locate the downloaded artifacts (`.dmg`, `.msi`, `.rpm`, `.deb`) within the `composeApp/build/compose/binaries/main/` directory structure for uploading. - **Cleanup:** Removes a redundant `List Gradle tasks` step from the build job.
1 parent 42b8b74 commit 3e80811

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/build-desktop.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ jobs:
3636
if: runner.os != 'Windows'
3737
run: chmod +x gradlew
3838

39-
- name: List Gradle tasks
40-
run: ./gradlew tasks --all
41-
4239
- name: Build native package
4340
run: ./gradlew ${{ matrix.gradle_task }} --stacktrace
4441

@@ -49,19 +46,30 @@ jobs:
4946
uses: actions/upload-artifact@v4
5047
with:
5148
name: build-${{ matrix.format }}
52-
path: composeApp/build/compose/binaries/**/${{ matrix.format }}/
49+
path: composeApp/build/compose/binaries/main/${{ matrix.format }}/
50+
51+
release:
52+
name: Create GitHub Release
53+
needs: build
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- name: Download build artifacts
58+
uses: actions/download-artifact@v4
59+
with:
60+
path: ./artifacts
5361

54-
- name: List artifacts
55-
run: ls -R
62+
- name: List downloaded files
63+
run: ls -R ./artifacts
5664

5765
- name: Upload to GitHub Release
5866
uses: softprops/action-gh-release@v2
5967
with:
6068
files: |
61-
*.dmg
62-
*.msi
63-
*.rpm
64-
*.deb
69+
composeApp/build/compose/binaries/main/dmg/*.dmg
70+
composeApp/build/compose/binaries/main/msi/*.msi
71+
composeApp/build/compose/binaries/main/rpm/*.rpm
72+
composeApp/build/compose/binaries/main/deb/*.deb
6573
draft: true
6674
tag_name: ${{ github.ref_name }}
6775
env:

composeApp/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ compose {
108108
macOS {
109109
iconFile.set(iconsRoot.resolve("app_logo.icns"))
110110
minimumSystemVersion = "12.0"
111-
packageName = "Git Backup Hub"
112111
bundleID = "com.meet.gitbackup.hub"
113112

114113
}

0 commit comments

Comments
 (0)