Skip to content

Commit d8c6fac

Browse files
authored
Merge pull request #115 from codellm-devkit/114-add-release-automation
Create release.yml
2 parents c5e9d1d + 63215aa commit d8c6fac

File tree

3 files changed

+93
-1
lines changed

3 files changed

+93
-1
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 and Test
33+
id: build
34+
continue-on-error: true # Allow the workflow to continue if this fails
35+
run: ./gradlew clean fatJar test
36+
37+
- name: Delete tag on failure
38+
if: steps.build.outcome != 'success'
39+
run: |
40+
git push --delete origin ${GITHUB_REF#refs/tags/}
41+
exit 1 # Fail the workflow
42+
43+
- name: Build Changelog
44+
id: gen_changelog
45+
uses: mikepenz/release-changelog-builder-action@v5
46+
with:
47+
failOnError: "true"
48+
configuration: .github/workflows/release_config.json
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Publish Release
53+
uses: softprops/action-gh-release@v1
54+
with:
55+
files: build/libs/*.jar
56+
body: ${{ steps.gen_changelog.outputs.changelog }}
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release_config.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## 🚀 Features",
5+
"labels": ["kind/feature", "enhancement"]
6+
},
7+
{
8+
"title": "## 🐛 Fixes",
9+
"labels": ["fix", "bug"]
10+
},
11+
{
12+
"title": "## ♻️ Refactoring",
13+
"labels": ["refactoring"]
14+
},
15+
{
16+
"title": "## ⚡️ Performance Improvements",
17+
"labels": ["performance"]
18+
},
19+
{
20+
"title": "## \uD83D\uDCDA Documentation",
21+
"labels": ["documentation", "doc"]
22+
},
23+
{
24+
"title": "## \uD83D\uDEA6 Tests",
25+
"labels": ["test"]
26+
},
27+
{
28+
"title": "## \uD83D\uDEE0 Other Updates",
29+
"labels": ["other", "kind/dependency-change"]
30+
}
31+
],
32+
"ignore_labels": [
33+
"ignore"
34+
]
35+
}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
Native WALA implementation of source code analysis tool for Enterprise Java Applications.
44

5-
![example workflow](https://github.com/IBM/codenet-minerva-code-analyzer/actions/workflows/main.yml/badge.svg)
65
## 1. Prerequisites
76

87
Before you begin, ensure you have met the following requirements:

0 commit comments

Comments
 (0)