Release 0.1.2 #21
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-bom: | |
| runs-on: ubuntu-latest | |
| env: | |
| MVN: ./mvnw --show-version --batch-mode --no-transfer-progress | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| cache: maven | |
| - run: $MVN package | |
| working-directory: bom | |
| - uses: actions/setup-java@v5 | |
| with: # running setup-java again overwrites the settings.xml | |
| java-version: 25 | |
| distribution: temurin | |
| server-id: central | |
| server-username: CENTRAL_USERNAME | |
| server-password: CENTRAL_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| - run: $MVN deploy -P release | |
| working-directory: bom | |
| env: | |
| CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
| CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| deploy: | |
| needs: deploy-bom | |
| runs-on: ubuntu-latest | |
| env: | |
| MVN: ./mvnw --show-version --batch-mode --no-transfer-progress | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| cache: maven | |
| - run: $MVN package | |
| - uses: actions/setup-java@v5 | |
| with: # running setup-java again overwrites the settings.xml | |
| java-version: 25 | |
| distribution: temurin | |
| server-id: central | |
| server-username: CENTRAL_USERNAME | |
| server-password: CENTRAL_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| - run: $MVN deploy -P op,os,prod,release | |
| env: | |
| CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
| CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| release: | |
| needs: deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: get-version | |
| uses: battila7/get-version-action@v2.3.0 | |
| - uses: actions/checkout@v6 | |
| - id: read-changelog | |
| uses: mindsers/changelog-reader-action@v2 | |
| with: | |
| path: ./CHANGELOG.md | |
| version: ${{ steps.get-version.outputs.version-without-v }} | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.get-version.outputs.version }} | |
| name: HAL Foundation ${{ steps.get-version.outputs.version-without-v }} | |
| body: ${{ steps.read-changelog.outputs.changes }} | |
| draft: false | |
| prerelease: false | |
| build-native: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| env: | |
| MVN: ./mvnw --show-version --batch-mode --no-transfer-progress | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: temurin | |
| cache: maven | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static | |
| - name: Build native binary for ${{ matrix.arch }} | |
| run: $MVN install -P op,prod,native -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime-options=--platform=linux/${{ matrix.arch }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: native-binary-${{ matrix.arch }} | |
| path: op/standalone/target/*-runner | |
| retention-days: 1 | |
| build-image: | |
| needs: build-native | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: get-version | |
| uses: battila7/get-version-action@v2.3.0 | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static | |
| - run: podman --version | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: native-binary-amd64 | |
| path: op/standalone/target/native-amd64 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: native-binary-arm64 | |
| path: op/standalone/target/native-arm64 | |
| - uses: redhat-actions/podman-login@v1 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - name: Build multi-arch image | |
| run: | | |
| VERSION="${{ steps.get-version.outputs.version-without-v }}" | |
| podman manifest create quay.io/halconsole/hal-op:latest | |
| podman build \ | |
| --platform linux/amd64 \ | |
| --manifest quay.io/halconsole/hal-op:latest \ | |
| --label maintainer=hpehl@redhat.com \ | |
| --label org.opencontainers.image.authors=hpehl@redhat.com \ | |
| --label org.opencontainers.image.description="HAL console on premise" \ | |
| --label org.opencontainers.image.licenses=Apache-2.0 \ | |
| --label org.opencontainers.image.revision="${VERSION}" \ | |
| --label org.opencontainers.image.source=https://github.com/hal/foundation \ | |
| --label org.opencontainers.image.title="HAL On Premise" \ | |
| --label org.opencontainers.image.url=https://hal.github.io \ | |
| --label org.opencontainers.image.vendor="Red Hat" \ | |
| --build-arg BINARY_PATH=target/native-amd64 \ | |
| -f op/standalone/src/main/docker/Dockerfile.native-micro \ | |
| op/standalone | |
| podman build \ | |
| --platform linux/arm64 \ | |
| --manifest quay.io/halconsole/hal-op:latest \ | |
| --label maintainer=hpehl@redhat.com \ | |
| --label org.opencontainers.image.authors=hpehl@redhat.com \ | |
| --label org.opencontainers.image.description="HAL console on premise" \ | |
| --label org.opencontainers.image.licenses=Apache-2.0 \ | |
| --label org.opencontainers.image.revision="${VERSION}" \ | |
| --label org.opencontainers.image.source=https://github.com/hal/foundation \ | |
| --label org.opencontainers.image.title="HAL On Premise" \ | |
| --label org.opencontainers.image.url=https://hal.github.io \ | |
| --label org.opencontainers.image.vendor="Red Hat" \ | |
| --build-arg BINARY_PATH=target/native-arm64 \ | |
| -f op/standalone/src/main/docker/Dockerfile.native-micro \ | |
| op/standalone | |
| podman tag quay.io/halconsole/hal-op:latest quay.io/halconsole/hal-op:${VERSION} | |
| podman manifest push quay.io/halconsole/hal-op:latest | |
| podman manifest push quay.io/halconsole/hal-op:${VERSION} | |
| hal-op-natives: | |
| needs: release | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - id: get-version | |
| uses: battila7/get-version-action@v2.3.0 | |
| - uses: actions/checkout@v6 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: 25 | |
| distribution: graalvm | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| components: native-image | |
| cache: maven | |
| - if: matrix.os == 'ubuntu-latest' | |
| run: ./mvnw --show-version --batch-mode --no-transfer-progress install -P op,prod,native -Dquarkus.native.container-build=false | |
| - if: matrix.os == 'macos-latest' | |
| run: ./mvnw --show-version --batch-mode --no-transfer-progress install -P op,prod,native -Dquarkus.native.container-build=false | |
| - if: matrix.os == 'windows-latest' | |
| run: .\mvnw.cmd --show-version --batch-mode --no-transfer-progress install -P op,prod,native "-Dquarkus.native.container-build=false" | |
| - run: | | |
| APP_NAME="hal-op" | |
| VERSION="${{ steps.get-version.outputs.version-without-v }}" | |
| if [ "${{ runner.os }}" = "Windows" ]; then | |
| find op/standalone/target -name '*-runner.exe' -exec mv {} "${APP_NAME}-${VERSION}-windows.exe" \; | |
| elif [ "${{ runner.os }}" = "macOS" ]; then | |
| find op/standalone/target -maxdepth 1 -name '*-runner' -type f -exec mv {} "${APP_NAME}-${VERSION}-macos" \; | |
| else | |
| find op/standalone/target -maxdepth 1 -name '*-runner' -type f -exec mv {} "${APP_NAME}-${VERSION}-linux" \; | |
| fi | |
| shell: bash | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: hal-op-${{ steps.get-version.outputs.version-without-v }}-* |