chore: update checksums and version for v1.0.2 (#267) #113
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: build.yml | |
| on: | |
| workflow_call: | |
| inputs: &workflow-inputs | |
| upload-artifacts: | |
| description: 'Upload build artifacts' | |
| required: false | |
| type: boolean | |
| default: true | |
| build-native: | |
| description: 'Build for all platforms' | |
| required: false | |
| type: boolean | |
| default: false | |
| workflow_dispatch: | |
| inputs: *workflow-inputs | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| build-native: | |
| if: github.event_name != 'push' && inputs.build-native | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-24.04, windows-2022, ubuntu-24.04-arm, macos-15-intel, macos-14 ] | |
| include: | |
| - os: ubuntu-24.04 | |
| artifact-name: astra-cli-linux-x86_64 | |
| artifact-type: tar | |
| - os: windows-2022 | |
| artifact-name: astra-cli-windows-x86_64 | |
| artifact-type: zip | |
| - os: ubuntu-24.04-arm | |
| artifact-name: astra-cli-linux-arm64 | |
| artifact-type: tar | |
| - os: macos-15-intel | |
| artifact-name: astra-cli-macos-x86_64 | |
| artifact-type: tar | |
| - os: macos-14 | |
| artifact-name: astra-cli-macos-arm64 | |
| artifact-type: tar | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up GraalVM | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: wrapper | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Build and package native image (tar) | |
| if: matrix.artifact-type == 'tar' | |
| run: ./gradlew nativeTar -Pprod | |
| - name: Build and package native image (zip) | |
| if: matrix.artifact-type == 'zip' | |
| run: ./gradlew nativeZip -Pprod | |
| - name: Upload artifacts | |
| if: github.event_name != 'push' && inputs.upload-artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact-name }} | |
| path: build/distributions/*.${{ matrix.artifact-type }}* | |
| if-no-files-found: error | |
| retention-days: 7 | |
| build-jar: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up GraalVM | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: wrapper | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| - name: Build JAR | |
| run: ./gradlew fatJar -Pprod | |
| - name: Upload JAR artifact | |
| if: github.event_name != 'push' && inputs.upload-artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: astra-cli-fat-jar | |
| path: build/libs/astra-fat.jar |