-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 2.19 KB
/
build-release-on-main-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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: [ macos-14, macos-13, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- 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