-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (43 loc) · 1.48 KB
/
main.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
name: Codeanalyzer CI
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-package:
runs-on: ubuntu-latest
env:
JAVA_HOME: ${{ github.workspace }}/graalvm-ce-java11-22.3.3
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Set up JDK 11 from GraalVM
run: |
echo "${{ env.JAVA_HOME }}/bin" >> $GITHUB_PATH
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
tar -xvzf graalvm-ce-java11-linux-amd64-22.3.3.tar.gz
${{ env.JAVA_HOME }}/bin/gu install native-image
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew clean fatJar
- name: Determine new tag
id: newtag
run: echo "::set-output name=tag::$(date +'%Y%m%dT%H%M%S')"
- name: Create Git Tag
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git tag ${{ steps.newtag.outputs.tag }}
git push origin ${{ steps.newtag.outputs.tag }}
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: build/libs/codeanalyzer.jar
tag_name: ${{ steps.newtag.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}