fix: another attempt to get compile to native working on linux #23
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: 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 ] # macos-14, macos-13, windows-latest, | |
runs-on: ${{ matrix.os }} | |
steps: | |
- id: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- id: install-libgl | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install libxtst-dev libharfbuzz-dev libgtk-3-dev libpango1.0-dev libatk1.0-dev libgl1-mesa-dev libx11-dev libfreetype6-dev libfontconfig1-dev | |
- id: setup-graalvm | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'liberica' | |
java-version: '21' | |
java-package: 'jdk+fx' | |
cache: 'maven' | |
- id: show-paths | |
run: | | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image --version | |
- id: maven-build-verify | |
run: mvn --batch-mode -Pnative-graalvm-default clean package assembly:single | |
- 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/log-gazer*.tar.gz | |
target/log-gazer*.zip | |
- 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 |