Release 3.6.13 #29
Workflow file for this run
This file contains 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 HAL | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
deploy: | |
name: Deploy Maven Artifacts | |
runs-on: ubuntu-latest | |
env: | |
MVN: ./mvnw --show-version --batch-mode | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
id: setup-jdk | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: maven | |
- name: Package | |
id: package | |
run: $MVN package -P prod,theme-wildfly | |
- name: Set up Maven Settings | |
id: setup-maven-settings | |
uses: actions/setup-java@v3 | |
with: # running setup-java again overwrites the settings.xml | |
java-version: 11 | |
distribution: temurin | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Deploy | |
id: deploy | |
run: $MVN deploy -P prod,release,theme-wildfly | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
standalone: | |
name: Build Standalone Console | |
needs: deploy | |
runs-on: ubuntu-latest | |
env: | |
MVN: ./mvnw --show-version --batch-mode | |
steps: | |
- name: Get Version | |
id: get-version | |
uses: battila7/[email protected] | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
id: setup-jdk | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: maven | |
- name: Login to Quay.io | |
id: login-to-quay-io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | |
- name: Standalone Tag | |
id: standalone-tag | |
run: $MVN package --projects standalone --also-make -P native,prod,theme-hal -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.image=quay.io/halconsole/hal:${{ steps.get-version.outputs.version-without-v }}.Final '-Dquarkus.container-image.labels."org.opencontainers.image.revision"='$GITHUB_SHA -Dquarkus.native.remote-container-build=true | |
- name: Check Latest | |
id: check-latest | |
run: | | |
LATEST_TAG=$( git tag | sort -V | tail -1 ) | |
if [ "$LATEST_TAG" = "${{ steps.get-version.outputs.version }}" ]; then | |
echo "::set-output name=latest::true" | |
else | |
echo "::set-output name=latest::false" | |
fi | |
- name: Standalone Latest | |
id: standalone-latest | |
if: steps.check-latest.outputs.latest == 'true' | |
run: $MVN package --projects standalone --also-make -P native,prod,theme-hal -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.image=quay.io/halconsole/hal:latest '-Dquarkus.container-image.labels."org.opencontainers.image.revision"='$GITHUB_SHA -Dquarkus.native.remote-container-build=true | |
publish: | |
name: Publish to GitHub Pages | |
needs: deploy | |
runs-on: ubuntu-latest | |
env: | |
MVN: ./mvnw --show-version --batch-mode | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
id: setup-jdk | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: maven | |
- name: Package | |
id: package | |
run: $MVN package -P prod,theme-hal | |
- name: Publish | |
id: publish | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: ./app/target/gh-pages | |
clean: true | |
release: | |
name: Create GitHub Release | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Version | |
id: get-version | |
uses: battila7/[email protected] | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Read Changelog | |
id: read-changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
path: ./CHANGELOG.md | |
version: ${{ steps.get-version.outputs.version-without-v }} | |
- name: Create GitHub Release | |
id: create-gh-release | |
uses: actions/create-release@v1 | |
env: | |
# Don't use ${{ secrets.GITHUB_TOKEN }} | |
# This doesn't trigger the release event | |
# that is necessary for the native.yml workflow | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ steps.get-version.outputs.version }} | |
release_name: HAL ${{ steps.get-version.outputs.version-without-v }}.Final | |
body: ${{ steps.read-changelog.outputs.changes }} | |
draft: false | |
prerelease: false |