Skip to content

Commit

Permalink
Fix utiLITI artifact upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
nightm4re94 committed Dec 27, 2023
1 parent 3a13e03 commit 89592fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
name: Build and Verify
steps:
- name: Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: JDK Setup
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ jobs:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
Expand All @@ -95,10 +95,11 @@ jobs:
run: ./gradlew jpackage -Prelease=true

- name: Upload package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: utiLITI-${{ runner.os }}
path: build/litiengine-utiliti/jpackage
path: utiliti/build/jpackage
# TODO consider uploading the artifacts to itch.io automatically with butler, /~https://github.com/jdno/setup-butler

create_release:
name: Create GitHub release
Expand Down
24 changes: 12 additions & 12 deletions utiliti/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
}

runtime {
options.set(["--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"])
options.set(["--strip-debug", "--no-header-files", "--no-man-pages"])
modules.set(["java.desktop", "java.logging", "java.datatransfer", "java.management", "java.xml"])

launcher {
Expand All @@ -48,7 +48,6 @@ runtime {
var iconFileType = currentOs.isWindows() ? "ico" : currentOs.isMacOsX() ? "icns" : "png"

imageOptions.addAll([
"--app-version", appVersion,
"--icon", "${project.file("src/dist/pixel-icon-utiliti.$iconFileType").path}",
"--description", description,
"--copyright", copyright,
Expand All @@ -59,6 +58,10 @@ runtime {
] as Collection<? extends String>)

if (currentOs.isMacOsX()) {
// TODO: Once we are above version 1.0.0, we should be able to use the project version directly for Mac builds.
def tmpAppVersion = project.version.toString().tokenize("-")[0].tokenize(".")
tmpAppVersion[0] = "1337"
appVersion = tmpAppVersion.join('.')
imageOptions.addAll(
["--mac-package-identifier", "de.gurkenlabs.litiengine.utiliti",
"--mac-package-name", applicationName // Name appearing in Menu Bar.
Expand All @@ -68,18 +71,15 @@ runtime {
}
}

tasks.register("createLicenseProperties") {
tasks.register("createLicenseProperties", WriteProperties) {
dependsOn processResources
doLast {
new File("$buildDir/resources/main/licensing.properties").withWriter { w ->
Properties p = new Properties()
p['copyright'] = copyright.toString()
p['website'] = gurkenlabs_url
p['version'] = version.toString()
p.store w, null
}
}
destinationFile = file("${layout.buildDirectory.get()}/resources/main/licensing.properties")
encoding = "UTF-8"
property('copyright', copyright.toString())
property('website', gurkenlabs_url)
property('version', version.toString())
}

classes {
dependsOn createLicenseProperties
}

0 comments on commit 89592fe

Please sign in to comment.