Skip to content

Commit 989c70d

Browse files
committed
versioning
1 parent b378022 commit 989c70d

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.github/workflows/build-gradle.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ jobs:
3737
steps:
3838
- name: Checkout Repository
3939
uses: actions/checkout@v4
40-
- name: Checkout Examples Repository
41-
uses: actions/checkout@v4
42-
with:
43-
repository: processing/processing-examples
44-
path: processing-examples
4540
- name: Install Java
4641
uses: actions/setup-java@v4
4742
with:
@@ -51,17 +46,18 @@ jobs:
5146
- name: Setup Gradle
5247
uses: gradle/actions/setup-gradle@v4
5348
- name: Build with Gradle
54-
run: ./gradlew packageDistributionForCurrentOS -Pversion=${{ github.sha }}
49+
run: ./gradlew packageDistributionForCurrentOS
5550
- name: Add instructions
51+
if: ${{ matrix.os_prefix == 'macos' }}
5652
run: |
57-
echo "run `xattr -d com.apple.quarantine Processing-4.3.2.dmg` to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
53+
echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
5854
- name: Add artifact
5955
uses: actions/upload-artifact@v4
6056
with:
6157
name: processing-${{github.sha}}${{ matrix.os_prefix }}-${{ matrix.arch }}
6258
path: |
63-
./app/build/compose/binaries/main/dmg/*.dmg
64-
./app/build/compose/binaries/main/dmg/*.txt
65-
./app/build/compose/binaries/main/msi/*.msi
66-
./app/build/compose/binaries/main/deb/*.deb
59+
./app/build/compose/binaries/main/dmg/Processing-*.dmg
60+
./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
61+
./app/build/compose/binaries/main/msi/Processing-*.msi
62+
./app/build/compose/binaries/main/deb/Processing-*.deb
6763
retention-days: 1

build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
group = "org.processing"
2-
version = "4.3.2"
2+
3+
// Grab the latest version from the GitHub API
4+
val apiUrl = "https://api.github.com/repos/processing/processing4/releases"
5+
val response = java.net.URL(apiUrl).readText()
6+
val tagName = response.substringAfter("\"tag_name\":\"").substringBefore("\"")
7+
val currentVersion = tagName.split("-").last()
8+
version = currentVersion.split(".").let { parts ->
9+
"${parts[0]}.${parts[1]}.${parts[2].toInt() + 1}"
10+
}
311

412
plugins {
513
kotlin("jvm") version libs.versions.kotlin apply false

0 commit comments

Comments
 (0)