Release 0.4.2 #13
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 | |
on: | |
pull_request: | |
types: [closed] | |
paths: | |
- '.github/project.yml' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: release | |
if: ${{github.event.pull_request.merged == true}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
- name: Retrieve Project Metadata | |
uses: radcortez/project-metadata-action@95ed3b828c4563fb1c1c9f4c319eceb9ce7de1b3 | |
id: metadata | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
metadata-file-path: '.github/project.yml' | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Build and Push API Image | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git checkout -b release | |
mvn -B release:prepare \ | |
-DreleaseVersion=${{ steps.metadata.outputs.current-version }} \ | |
-DdevelopmentVersion=${{ steps.metadata.outputs.next-version }} | |
git checkout ${{github.base_ref}} | |
git rebase release | |
export QUARKUS_CONTAINER_IMAGE_REGISTRY="${{ secrets.IMAGE_REPO_HOSTNAME }}" | |
export QUARKUS_CONTAINER_IMAGE_GROUP="${{ secrets.IMAGE_REPO_NAMESPACE }}" | |
export QUARKUS_CONTAINER_IMAGE_USERNAME="${{ secrets.IMAGE_REPO_USERNAME }}" | |
export QUARKUS_CONTAINER_IMAGE_PASSWORD="${{ secrets.IMAGE_REPO_PASSWORD }}" | |
export QUARKUS_CONTAINER_IMAGE_PUSH="true" | |
export GIT_REVISION=$(git rev-parse --short release) | |
# Build and push the release images using the commit tagged in `release:prepare` | |
mvn -B -P container-image release:perform | |
- name: Push Release Tag | |
run: | | |
git push | |
git push --tags | |
- name: Create GitHub Release | |
uses: radcortez/milestone-release-action@98bd3321583e9bdbbe15c08fa4b2249371efaeaa | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
milestone-title: ${{ steps.metadata.outputs.current-version }} |