Skip to content

Commit

Permalink
ci: Merge all releases into a single workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed May 27, 2024
1 parent 129285f commit 7ced1c0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 57 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/build-binaries-linux-arm64.yml

This file was deleted.

51 changes: 50 additions & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,55 @@ jobs:
draft: false
prerelease: false
body: ${{ env.CHANGELOG}}

build_linux_arm64:
name: Building Linux arm64 for CATS ${{ github.event.inputs.releaseversion }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: cats-${{ github.event.inputs.releaseversion }}

- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and run CATS
run: |
./mvnw -B clean --file pom.xml
./mvnw clean package -Pnative -Dquarkus.native.remote-container-build=true -DskipTests=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:23.1.3.1-Final-java21-arm64
- name: Tar files for Linux arm64
run: |
cp target/cats-runner cats
tar -czf cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz cats
- name: Upload Tar files for Linux arm64
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_URL: ${{ needs.release.outputs.release_upload_url }}
with:
upload_url: ${{ env.RELEASE_URL }}
asset_path: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz
asset_name: cats_linux_arm64_${{ github.event.inputs.releaseversion }}.tar.gz
asset_content_type: application/gzip
run: echo ${{ env.RELEASE_URL }}

build_uberjar:
name: Building CATS uberjar for release ${{ github.event.inputs.releaseversion }}
needs: release
Expand Down Expand Up @@ -125,7 +174,7 @@ jobs:
- name: Determine OS Name
id: determine_os
run: echo "RUNNER_OS=${{ matrix.os }}" | sed 's/-[^-]*$//' >> $GITHUB_ENV
run: echo "RUNNER_OS=${{ matrix.os }}" | sed -e 's/-[^-]*$//' -e 's/ubuntu/linux/' >> $GITHUB_ENV

- name: Build and run CATS
run: |
Expand Down

0 comments on commit 7ced1c0

Please sign in to comment.