diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index f2dcd0c38b..cc2cdd393e 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -65,6 +65,16 @@ jobs: name: installer-package-${{ runner.os }} path: build/package/* if-no-files-found: error + - name: Generate jars + if: ${{ runner.os == 'Linux' }} + run: ./gradlew shadowJar + - name: Upload FatJars + if: ${{ runner.os == 'Linux' }} + uses: actions/upload-artifact@v4.3.0 + with: + name: fat-jars + path: build/shadow/* + if-no-files-found: error # Performs a dry-deployment if credentials are available test-deploy: needs: @@ -97,10 +107,11 @@ jobs: maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing-key: ${{ secrets.SIGNING_KEY }} signing-password: ${{ secrets.SIGNING_PASSWORD }} - # Test jpackage utility - test-packaging: + # Test packages correctness + test-packages: needs: - select-java-version + - build strategy: matrix: os: [ windows-2022, macos-12, ubuntu-22.04 ] @@ -119,16 +130,18 @@ jobs: with: java-version: ${{ needs.select-java-version.outputs.java-version }} distribution: 'temurin' - - name: Dry run - shell: bash - run: ./gradlew jpackage --info -Djpackage.dryRun=true - name: Install bsdtar if: runner.os == 'Linux' run: sudo apt update && sudo apt install libarchive-tools - - name: Test packaging + - name: Download packages + uses: actions/download-artifact@v4.1.1 + with: + name: installer-package-${{ runner.os }} + path: build/package/ + merge-multiple: true + - name: Test package shell: bash - run: ./gradlew testJpackageOutput --info - + run: ./gradlew testJpackageOutput --info # Builds the website and verifies link sanity build-website: needs: @@ -206,7 +219,7 @@ jobs: - build - build-website - test-deploy - - test-packaging + - test-packages runs-on: ubuntu-22.04 if: >- !github.event.repository.fork @@ -236,8 +249,14 @@ jobs: - name: Download packages uses: actions/download-artifact@v4.1.1 with: - path: build/package/ pattern: installer-package-* + path: build/package/ + merge-multiple: true + - name: Download fatJars + uses: actions/download-artifact@v4.1.1 + with: + name: fat-jars + path: build/shadow/ merge-multiple: true - name: Find the version of Node from package.json id: node-version @@ -272,7 +291,6 @@ jobs: maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} signing-key: ${{ secrets.SIGNING_KEY }} signing-password: ${{ secrets.SIGNING_PASSWORD }} - #Add a step to publish to AUR success: runs-on: ubuntu-22.04 @@ -281,7 +299,7 @@ jobs: - build-website - release - test-deploy - - test-packaging + - test-packages if: >- always() && ( contains(join(needs.*.result, ','), 'failure') diff --git a/alchemist-full/build.gradle.kts b/alchemist-full/build.gradle.kts index ca7e64bc71..d47e020129 100644 --- a/alchemist-full/build.gradle.kts +++ b/alchemist-full/build.gradle.kts @@ -141,7 +141,7 @@ tasks.register("testJpackageOutput") { require(rootProject.name in execFiles || "${rootProject.name}.exe" in execFiles) require(jpackageFull.get().mainJar in appFiles) } - dependsOn(jpackageFull) + mustRunAfter(jpackageFull) finalizedBy(deleteJpackageOutput) } diff --git a/release.config.js b/release.config.js index 73005ff04b..62ac13de41 100644 --- a/release.config.js +++ b/release.config.js @@ -15,7 +15,6 @@ git push --force origin \${nextRelease.version} || exit 6 git -C build/website/ add . || exit 1 git -C build/website/ commit -m "chore: update website to version \${nextRelease.version}" || exit 2 git -C build/website/ push || exit 3 -./gradlew shadowJar --parallel || ./gradlew shadowJar --parallel || exit 4 RELEASE_ON_CENTRAL="./gradlew uploadKotlinOSSRH uploadKotlinMultiplatform uploadJvm uploadJs release --parallel" eval "$RELEASE_ON_CENTRAL" || eval "$RELEASE_ON_CENTRAL" || eval "$RELEASE_ON_CENTRAL" || exit 5 ./gradlew publishKotlinOSSRHPublicationToGithubRepository --continue || true