Skip to content

Commit 9aae318

Browse files
authored
Create release.yml
1 parent c5e9d1d commit 9aae318

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Java Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
env:
16+
JAVA_HOME: ${{ github.workspace }}/graalvm-ce-java11-22.3.3
17+
18+
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up JDK 11 from GraalVM
23+
run: |
24+
echo "${{ env.JAVA_HOME }}/bin" >> $GITHUB_PATH
25+
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
26+
tar -xvzf graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
27+
${{ env.JAVA_HOME }}/bin/gu install native-image
28+
29+
- name: Make gradlew executable
30+
run: chmod +x ./gradlew
31+
32+
- name: Build with Gradle
33+
run: ./gradlew clean fatJar
34+
35+
- name: Build Changelog
36+
id: gen_changelog
37+
uses: mikepenz/release-changelog-builder-action@v4
38+
with:
39+
failOnError: "true"
40+
configuration: .github/workflows/release_config.json
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Publish Release
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
files: build/libs/*.jar
48+
body: ${{ steps.gen_changelog.outputs.changelog }}
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)