Skip to content

fix: prep next release #5

fix: prep next release

fix: prep next release #5

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:
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: main
- name: setup-jdk
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: maven-build-verify
run: mvn --batch-mode -Posslabz-release -Pnative-jpackage clean deploy
- name: configure-git-user
uses: qoomon/actions--setup-git@v1
with:
user: bot
- name: Extract version from pom.xml file
id: version-extractor
uses: dostonhamrakulov/[email protected]
with:
file_path: ${{ github.workspace }}/pom.xml
- name: Get the output version
run: echo "The found version ${{ steps.version-extractor.outputs.version }}"
- name: Tag snapshot
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.version-extractor.outputs.version }}
- name: create-release-notes
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ steps.version-extractor.outputs.version }}
files: target/dist/*
- name: merge-main-to-dev
run: |
git fetch --unshallow
git checkout dev
git pull
git merge --no-ff main -m "[release] auto-merge released main back to dev"
git push