diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 4da6d9a9..98848dd0 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -37,6 +37,20 @@ jobs: uses: actions/upload-artifact@v2 with: name: Sparrow Build - ${{ runner.os }} + path: | + build/jpackage/* + !build/jpackage/Sparrow/ + - name: Headless build with Gradle + if: ${{ runner.os == 'Linux' }} + run: ./gradlew -Djava.awt.headless=true clean jpackage + - name: Package headless tar distribution + if: ${{ runner.os == 'Linux' }} + run: ./gradlew packageTarDistribution + - name: Upload Headless Artifact + if: ${{ runner.os == 'Linux' }} + uses: actions/upload-artifact@v2 + with: + name: Sparrow Build - ${{ runner.os }} Headless path: | build/jpackage/* !build/jpackage/Sparrow/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 71752404..f6c09bdc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,10 @@ if(System.getProperty("os.arch") == "aarch64") { targetName = "-" + osArch } def headless = "true".equals(System.getProperty("java.awt.headless")) || GraphicsEnvironment.isHeadless() +def sparrowBuild = "" +if(headless) { + sparrowBuild = "Server" +} group "com.sparrowwallet" version "${sparrowVersion}" @@ -224,7 +228,7 @@ jlink { addExtraDependencies("javafx") jpackage { imageName = "Sparrow" - installerName = "Sparrow" + installerName = "Sparrow${sparrowBuild}" appVersion = "${sparrowVersion}" skipInstaller = os.macOsX || properties.skipInstallers imageOptions = [] @@ -251,7 +255,7 @@ task removeGroupWritePermission(type: Exec) { } task packageZipDistribution(type: Zip) { - archiveFileName = "Sparrow-${sparrowVersion}.zip" + archiveFileName = "Sparrow${sparrowBuild}-${sparrowVersion}.zip" destinationDirectory = file("$buildDir/jpackage") from("$buildDir/jpackage/") { include "Sparrow/**" @@ -261,7 +265,7 @@ task packageZipDistribution(type: Zip) { task packageTarDistribution(type: Tar) { dependsOn removeGroupWritePermission - archiveFileName = "sparrow-${sparrowVersion}.tar.gz" + archiveFileName = "sparrow${sparrowBuild.toLowerCase()}-${sparrowVersion}.tar.gz" destinationDirectory = file("$buildDir/jpackage") compression = Compression.GZIP from("$buildDir/jpackage/") {