Skip to content

Commit 0674c24

Browse files
committed
Workflow improvements
1 parent 448ee16 commit 0674c24

File tree

7 files changed

+20
-21
lines changed

7 files changed

+20
-21
lines changed

.github/workflows/pull_request-gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ jobs:
7676
- name: Add artifact
7777
uses: actions/upload-artifact@v4
7878
with:
79-
name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-pr_${{ github.ref_name }}
79+
name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-pr_${{ github.event.pull_request.number }}
8080
retention-days: 5
8181
path: app/build/compose/binaries/main/${{ matrix.binary }}

.github/workflows/release-gradle.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
build_number: ${{ steps.tag_info.outputs.build_number }}
1111
version: ${{ steps.tag_info.outputs.version }}
1212
steps:
13-
- name: Extract version and build number
13+
- name: Extract version and revision
1414
id: tag_info
1515
shell: bash
1616
run: |
1717
TAG_NAME="${GITHUB_REF#refs/tags/}"
18-
BUILD_NUMBER=$(echo "$TAG_NAME" | cut -d'-' -f2)
18+
REVISION=$(echo "$TAG_NAME" | cut -d'-' -f2)
1919
VERSION=$(echo "$TAG_NAME" | cut -d'-' -f3)
2020
2121
# Set outputs for use in later jobs or steps
22-
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
22+
echo "revision=$REVISION" >> $GITHUB_OUTPUT
2323
echo "version=$VERSION" >> $GITHUB_OUTPUT
2424
reference:
2525
name: Publish Processing Reference to release
@@ -75,7 +75,7 @@ jobs:
7575
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
7676

7777
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
78-
ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
78+
ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
7979
build:
8080
name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Release
8181
runs-on: ${{ matrix.os }}
@@ -142,7 +142,8 @@ jobs:
142142
run: ./gradlew packageDistributionForCurrentOS
143143
env:
144144
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
145-
ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
145+
ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
146+
ORG_GRADLE_PROJECT_revision: ${{ needs.version.outputs.revision }}
146147

147148
- name: Upload portables to release
148149
uses: svenstaro/upload-release-action@v2

app/build.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ plugins{
1414
alias(libs.plugins.download)
1515
}
1616

17-
group = rootProject.group
18-
version = rootProject.version
19-
val revision = rootProject.findProperty("revision") ?: "1300"
20-
2117
repositories{
2218
mavenCentral()
2319
google()
@@ -40,8 +36,8 @@ compose.desktop {
4036
mainClass = "processing.app.ui.Start"
4137

4238
jvmArgs(*listOf(
43-
Pair("processing.version", version),
44-
Pair("processing.revision", revision),
39+
Pair("processing.version", rootProject.version),
40+
Pair("processing.revision", findProperty("revision") ?: Int.MAX_VALUE),
4541
Pair("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt"),
4642
Pair("processing.download.page", "https://processing.org/download/"),
4743
Pair("processing.download.latest", "https://processing.org/download/latest.txt"),
@@ -167,6 +163,8 @@ tasks.register<Exec>("packageCustomMsi"){
167163
workingDir = file("windows")
168164
group = "compose desktop"
169165

166+
val version = if(version == "unspecified") "1.0.0" else version
167+
170168
commandLine(
171169
"dotnet",
172170
"build",
@@ -187,10 +185,12 @@ tasks.register("generateSnapConfiguration"){
187185
else -> System.getProperty("os.arch")
188186
}
189187

188+
val version = if(version == "unspecified") "1.0.0" else version
189+
190190
val dir = distributable.destinationDir.get()
191191
val content = """
192192
name: ${rootProject.name}
193-
version: ${rootProject.version}
193+
version: $version
194194
base: core22
195195
summary: A creative coding editor
196196
description: |

build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
group = project.findProperty("group") ?: "org.processing"
2-
version = project.findProperty("version") ?: "0.0.0"
3-
41
plugins {
52
kotlin("jvm") version libs.versions.kotlin apply false
63
alias(libs.plugins.kotlinMultiplatform) apply false

core/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ plugins {
66
alias(libs.plugins.mavenPublish)
77
}
88

9-
group = "org.processing"
10-
119
repositories {
1210
mavenCentral()
1311
maven { url = uri("https://jogamp.org/deployment/maven") }
@@ -23,6 +21,11 @@ sourceSets{
2321
exclude("**/*.java")
2422
}
2523
}
24+
test{
25+
java{
26+
srcDirs("test")
27+
}
28+
}
2629
}
2730

2831
dependencies {

java/lsp/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ plugins{
55
id("com.vanniktech.maven.publish") version "0.30.0"
66
}
77

8-
group = "org.processing"
9-
108
repositories{
119
mavenCentral()
1210
google()

java/preprocessor/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins{
55
alias(libs.plugins.mavenPublish)
66
}
77

8-
group = "org.processing"
8+
group = "$group.java"
99

1010
repositories{
1111
mavenCentral()

0 commit comments

Comments
 (0)