Release 0.0.8 #13
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: 21 | |
| 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: 21 | |
| 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: 21 | |
| distribution: temurin | |
| cache: maven | |
| - run: $MVN package | |
| - uses: actions/setup-java@v5 | |
| with: # running setup-java again overwrites the settings.xml | |
| java-version: 21 | |
| 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 | |
| hal-op-image: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| env: | |
| MVN: ./mvnw --show-version --batch-mode --no-transfer-progress | |
| steps: | |
| - id: get-version | |
| uses: battila7/get-version-action@v2.3.0 | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: temurin | |
| cache: maven | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static | |
| - run: $MVN install -Dquickly -P op,prod,native -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true | |
| - uses: redhat-actions/podman-login@v1 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| - id: build-image | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| tags: quay.io/halconsole/hal-op:latest quay.io/halconsole/hal-op:${{ steps.get-version.outputs.version-without-v }} | |
| platforms: linux/amd64,linux/arm64 | |
| labels: | | |
| maintainer=hpehl@redhat.com | |
| org.opencontainers.image.authors=hpehl@redhat.com | |
| org.opencontainers.image.description=HAL console on premise | |
| org.opencontainers.image.licenses=Apache-2.0 | |
| org.opencontainers.image.revision=${{ steps.get-version.outputs.version-without-v }} | |
| org.opencontainers.image.source=https://github.com/hal/foundation | |
| org.opencontainers.image.title=HAL On Premise | |
| org.opencontainers.image.url=https://hal.github.io | |
| org.opencontainers.image.vendor=Red Hat | |
| containerfiles: op/standalone/src/main/docker/Dockerfile.native-distroless | |
| context: op/standalone | |
| - uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ steps.build-image.outputs.image }} | |
| tags: ${{ steps.build-image.outputs.tags }} | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
| 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: 21 | |
| distribution: mandrel | |
| 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 -Dquickly -P op,prod,native -Dquarkus.native.container-build=false | |
| - if: matrix.os == 'macos-latest' | |
| run: ./mvnw --show-version --batch-mode --no-transfer-progress install -Dquickly -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 -Dquickly -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 | |
| mv op/standalone/target/*-runner.exe "${APP_NAME}-${VERSION}-windows.exe" | |
| elif [ "${{ runner.os }}" = "macOS" ]; then | |
| mv op/standalone/target/*-runner "${APP_NAME}-${VERSION}-macos" | |
| else | |
| mv op/standalone/target/*-runner "${APP_NAME}-${VERSION}-linux" | |
| fi | |
| shell: bash | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: hal-op-${{ steps.get-version.outputs.version-without-v }}-* |