@@ -33,32 +33,25 @@ jobs:
3333 run : chmod +x gradlew
3434
3535 # Step 4: Build the app
36- # This runs the Gradle task to create the native installer package.
3736 - name : Build with Gradle
38- run : ./gradlew createReleaseDistributable
37+ run : ./gradlew packageReleaseDistribution
3938
4039 # Step 5: Upload the generated installer to the release
4140 - name : Upload Release Artifact
4241 uses : actions/upload-release-asset@v1
4342 with :
44- # This is a secret token that GitHub Actions provides automatically.
45- # It gives the workflow permission to upload files to your release.
4643 github_token : ${{ secrets.GITHUB_TOKEN }}
47-
48- # This is the URL for the release that triggered the workflow.
4944 upload_url : ${{ github.event.release.upload_url }}
5045
51- # Find the correct asset path based on the OS.
52- # The '**' is a wildcard that finds the file regardless of its exact name.
46+ # The path now correctly points to the final installer files.
5347 asset_path : |
54- ${{ matrix.os == 'windows-latest' && format('{0}/shared/build/compose/binaries/main/dist /*.msi', github.workspace) || '' }}
55- ${{ matrix.os == 'macos-latest' && format('{0}/shared/build/compose/binaries/main/dist /*.dmg', github.workspace) || '' }}
56- ${{ matrix.os == 'ubuntu-latest' && format('{0}/shared/build/compose/binaries/main/dist /*.deb', github.workspace) || '' }}
48+ ${{ matrix.os == 'windows-latest' && format('{0}/shared/build/compose/binaries/main-release/msi /*.msi', github.workspace) || '' }}
49+ ${{ matrix.os == 'macos-latest' && format('{0}/shared/build/compose/binaries/main-release/dmg /*.dmg', github.workspace) || '' }}
50+ ${{ matrix.os == 'ubuntu-latest' && format('{0}/shared/build/compose/binaries/main-release/deb /*.deb', github.workspace) || '' }}
5751
58- # This is the name the file will have on the release page.
5952 asset_name : |
6053 ${{ matrix.os == 'windows-latest' && 'AgeCalculator-windows-installer.msi' || '' }}
6154 ${{ matrix.os == 'macos-latest' && 'AgeCalculator-macOS-installer.dmg' || '' }}
6255 ${{ matrix.os == 'ubuntu-latest' && 'AgeCalculator-linux-installer.deb' || '' }}
6356
64- asset_content_type : application/octet-stream
57+ asset_content_type : application/octet-stream
0 commit comments