Skip to content

fix: prep for next release #13

fix: prep for next release

fix: prep for next release #13

name: build-release-on-main-push
on:
push:
branches:
- main
jobs:
build-release-on-main-push:
if: ${{ !contains(github.event.head_commit.message, '[release]') }} # prevent recursive releases
permissions:
contents: write
packages: write
strategy:
max-parallel: 1 # otherwise the release upload will fail
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- id: setup-jdk
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- id: maven-build-verify
run: mvn --batch-mode -Posslabz-release -Pnative-jpackage clean verify
- id: configure-git-user
uses: qoomon/actions--setup-git@v1
with:
user: bot
- id: get-version-from-pom
uses: dostonhamrakulov/[email protected]
with:
file_path: ${{ github.workspace }}/pom.xml
- id: get-latest-tag
uses: WyriHaximus/github-action-get-previous-tag@v1
- name: tag-version
if: ${{ steps.get-version-from-pom.outputs.version != steps.get-latest-tag.outputs.tag}}
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.get-version-from-pom.outputs.version }}
- id: create-release-notes
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ steps.get-version-from-pom.outputs.version }}
files: target/dist/*
- id: merge-main-to-dev
run: |
git checkout dev
git pull
git merge --no-ff main -m "[release] auto-merge released main back to dev"
git push