bump version (#660) #46
Workflow file for this run
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: Release Build | |
| on: | |
| push: | |
| tags: | |
| - "*.*.*" | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-22.04 | |
| env: | |
| LANG: C | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'zulu' | |
| - name: Set up Node.js 24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Set up environment variables | |
| run: | | |
| echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV | |
| echo "SCALA_VERSION=3.3.7" >> $GITHUB_ENV | |
| - name: JAR Build | |
| run: ./mill "sjsonnet.jvm[$SCALA_VERSION].__.assembly" | |
| - name: JS Build | |
| run: ./mill "sjsonnet.js[$SCALA_VERSION].fullLinkJS" | |
| - name: WASM Build | |
| run: ./mill "sjsonnet.wasm[$SCALA_VERSION].fullLinkJS" | |
| - name: Playground Build | |
| run: ./mill playground.bundle | |
| - name: Rename Artifacts | |
| run: | | |
| mkdir release | |
| cp ./out/sjsonnet/js/$SCALA_VERSION/fullLinkJS.dest/main.js ./release/sjsonnet-$VERSION.js | |
| cp ./out/sjsonnet/js/$SCALA_VERSION/fullLinkJS.dest/main.js.map ./release/sjsonnet-$VERSION.js.map | |
| pushd ./out/sjsonnet/wasm/$SCALA_VERSION/fullLinkJS.dest | |
| zip -r sjsonnet-wasm-$VERSION.zip * | |
| popd | |
| cp ./out/sjsonnet/wasm/$SCALA_VERSION/fullLinkJS.dest/sjsonnet-wasm-$VERSION.zip ./release/sjsonnet-wasm-$VERSION.zip | |
| cp ./out/sjsonnet/jvm/$SCALA_VERSION/assembly.dest/out.jar ./release/sjsonnet-$VERSION.jar | |
| cp ./out/sjsonnet/jvm/$SCALA_VERSION/client/assembly.dest/out.jar ./release/sjsonnet-client-$VERSION.jar | |
| cp ./out/sjsonnet/jvm/$SCALA_VERSION/server/assembly.dest/out.jar ./release/sjsonnet-server-$VERSION.jar | |
| cp ./out/playground/bundle.dest/index.html ./release/sjsonnet-playground-$VERSION.html | |
| - uses: actions/upload-artifact@v7 | |
| name: Upload Artifacts | |
| with: | |
| name: sjsonnet-${{ env.VERSION }}-jvmjswasm | |
| path: release/* | |
| retention-days: 1 | |
| if-no-files-found: error | |
| release-native: | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| platform: | |
| - name: linux-x86_64 | |
| os: ubuntu-22.04 | |
| - name: linux-arm64 | |
| os: ubuntu-22.04-arm | |
| - name: darwin-x86_64 | |
| os: macos-15-intel | |
| - name: darwin-arm64 | |
| os: macos-15 | |
| runs-on: ${{ matrix.platform.os }} | |
| env: | |
| LANG: C | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'zulu' | |
| - name: Set up environment variables | |
| run: | | |
| echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV | |
| echo "SCALA_VERSION=3.3.7" >> $GITHUB_ENV | |
| - name: Native Binary Build | |
| run: ./mill "sjsonnet.native[$SCALA_VERSION].nativeLink" | |
| - name: GraalVM Binary Build | |
| run: ./mill "sjsonnet.graal.nativeImage" | |
| - name: Rename Artifacts | |
| run: | | |
| mkdir release | |
| cp ./out/sjsonnet/native/$SCALA_VERSION/nativeLink.dest/out ./release/sjsonnet-$VERSION-${{ matrix.platform.name }} | |
| cp ./out/sjsonnet/graal/nativeImage.dest/native-executable ./release/sjsonnet-graalvm-$VERSION-${{ matrix.platform.name }} | |
| - uses: actions/upload-artifact@v7 | |
| name: Upload Native Binary | |
| with: | |
| name: sjsonnet-${{ env.VERSION }}-${{ matrix.platform.name }} | |
| path: release/* | |
| retention-days: 1 | |
| if-no-files-found: error | |
| create-release-package: | |
| permissions: | |
| contents: write | |
| needs: | |
| - release | |
| - release-native | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up environment variables | |
| run: | | |
| echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV | |
| mkdir -p release | |
| - uses: actions/download-artifact@v8 | |
| name: Download Artifacts | |
| with: | |
| path: release | |
| merge-multiple: true | |
| - name: Compute SHA256 Sum | |
| run: | | |
| pushd release | |
| ls -la | |
| sha256sum sjsonnet-* > sums.sha256 | |
| popd | |
| - uses: actions/upload-artifact@v7 | |
| name: Upload Package | |
| with: | |
| name: sjsonnet-${{ env.VERSION }}-release | |
| path: release/* | |
| retention-days: 7 | |
| if-no-files-found: error |