Skip to content

Commit ea6aced

Browse files
committed
Add portables
[skip ci]
1 parent cae9671 commit ea6aced

3 files changed

Lines changed: 37 additions & 10 deletions

File tree

.github/workflows/release-gradle.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,28 @@ jobs:
6363
- os: ubuntu-24.04-arm
6464
os_prefix: linux
6565
arch: aarch64
66-
binary: processing_${{ needs.version.outputs.version }}_arm64.snap
66+
binary: processing_${{ needs.version.outputs.version }}_arm64
67+
extension: snap
6768
- os: ubuntu-latest
6869
os_prefix: linux
6970
arch: x64
70-
binary: processing_${{ needs.version.outputs.version }}_amd64.snap
71+
binary: processing_${{ needs.version.outputs.version }}_amd64
72+
extension: snap
7173
- os: windows-latest
7274
os_prefix: windows
7375
arch: x64
74-
binary: msi/Processing-${{ needs.version.outputs.version }}.msi
76+
binary: msi/Processing-${{ needs.version.outputs.version }}
77+
extension: msi
7578
- os: macos-latest
7679
os_prefix: macos
7780
arch: x64
78-
binary: dmg/Processing-${{ needs.version.outputs.version }}.dmg
81+
binary: dmg/Processing-${{ needs.version.outputs.version }}
82+
extension: dmg
7983
- os: macos-latest
8084
os_prefix: macos
8185
arch: aarch64
82-
binary: dmg/Processing-${{ needs.version.outputs.version }}.dmg
86+
binary: dmg/Processing-${{ needs.version.outputs.version }}
87+
extension: dmg
8388
steps:
8489
- name: Install Certificates for Code Signing
8590
if: runner.os == 'macOS'
@@ -113,9 +118,16 @@ jobs:
113118
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
114119
ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
115120

116-
- name: Upload binaries to release
121+
- name: Upload portables to release
117122
uses: svenstaro/upload-release-action@v2
118123
with:
119124
repo_token: ${{ secrets.GITHUB_TOKEN }}
120-
asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}
121-
file: app/build/compose/binaries/main/${{ matrix.binary }}
125+
asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}-portable.zip
126+
file: app/build/compose/binaries/main/Processing-${{ needs.version.outputs.version }}.zip
127+
128+
- name: Upload installers to release
129+
uses: svenstaro/upload-release-action@v2
130+
with:
131+
repo_token: ${{ secrets.GITHUB_TOKEN }}
132+
asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}.${{ matrix.extension }}
133+
file: app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}

app/build.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,23 @@ tasks.register<Exec>("packageSnap"){
229229

230230
commandLine("snapcraft")
231231
}
232+
tasks.register<Zip>("zipDistributable"){
233+
dependsOn("createDistributable")
234+
group = "compose desktop"
235+
236+
val distributable = tasks.named<AbstractJPackageTask>("createDistributable").get()
237+
val dir = distributable.destinationDir.get()
238+
val packageName = distributable.packageName.get()
239+
240+
from(dir)
241+
archiveBaseName.set(packageName)
242+
destinationDirectory.set(dir.file("../").asFile)
243+
}
232244

233245
afterEvaluate{
246+
tasks.named("createDistributable").configure{
247+
finalizedBy("zipDistributable")
248+
}
234249
tasks.named("packageDmg").configure{
235250
dependsOn("packageCustomDmg")
236251
group = "compose desktop"

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
group = "org.processing"
2-
version = "4.4.0"
1+
group = project.findProperty("group") ?: "org.processing"
2+
version = project.findProperty("version") ?: "4.4.0"
33

44
plugins {
55
kotlin("jvm") version libs.versions.kotlin apply false

0 commit comments

Comments
 (0)