Update sbt-native-packager to 1.11.7 (#247) #158
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Compile & publish | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: ["v*"] | |
| jobs: | |
| aot-compile: | |
| name: AOT compile on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-14, windows-2022, ubuntu-22.04, ubuntu-22.04-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| native-image-job-reports: 'true' | |
| - name: Setup SBT | |
| uses: sbt/setup-sbt@v1 | |
| - name: Build native image | |
| run: sbt GraalVMNativeImage/packageBin | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jelly-cli-${{ matrix.os }} | |
| path: target/graalvm-native-image/* | |
| jit-compile: | |
| name: Build the uber-JAR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: sbt | |
| - name: Setup SBT | |
| uses: sbt/setup-sbt@v1 | |
| - name: Build assembly | |
| shell: bash | |
| run: | | |
| sbt -v assembly | |
| mv target/scala-*/jelly-cli-assembly*.jar jelly-cli.jar | |
| - name: Upload assembly | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jelly-cli-assembly | |
| path: jelly-cli.jar | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - aot-compile | |
| - jit-compile | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| - name: Rename binaries | |
| run: | | |
| mv jelly-cli-assembly/jelly-cli.jar jelly-cli.jar | |
| mv jelly-cli-macos-14/jelly-cli jelly-cli-mac-arm64 | |
| mv jelly-cli-ubuntu-22.04/jelly-cli jelly-cli-linux-x86_64 | |
| mv jelly-cli-ubuntu-22.04-arm/jelly-cli jelly-cli-linux-arm64 | |
| mv jelly-cli-windows-2022/jelly-cli.exe jelly-cli-windows-x86_64.exe | |
| - name: Create gzipped versions | |
| run: | | |
| gzip -9 -k jelly-cli-mac-arm64 & | |
| gzip -9 -k jelly-cli-linux-x86_64 & | |
| gzip -9 -k jelly-cli-linux-arm64 & | |
| gzip -9 -k jelly-cli-windows-x86_64.exe & | |
| wait | |
| - name: Upload binaries (pre-release) | |
| if: github.ref == 'refs/heads/main' | |
| uses: ncipollo/[email protected] | |
| with: | |
| allowUpdates: true | |
| prerelease: true | |
| draft: false | |
| omitDraftDuringUpdate: false | |
| makeLatest: false | |
| tag: dev | |
| name: "Development build" | |
| artifacts: jelly-cli* | |
| generateReleaseNotes: true | |
| - name: Upload binaries (tagged release) | |
| if: github.ref != 'refs/heads/main' | |
| uses: ncipollo/[email protected] | |
| with: | |
| prerelease: false | |
| draft: false | |
| makeLatest: true | |
| tag: "${{ github.ref_name }}" | |
| name: "${{ github.ref_name }}" | |
| artifacts: jelly-cli* | |
| generateReleaseNotes: true |