-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from codellm-devkit/114-add-release-automation
Create release.yml
- Loading branch information
Showing
3 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Java Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
JAVA_HOME: ${{ github.workspace }}/graalvm-ce-java11-22.3.3 | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- 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 and Test | ||
id: build | ||
continue-on-error: true # Allow the workflow to continue if this fails | ||
run: ./gradlew clean fatJar test | ||
|
||
- name: Delete tag on failure | ||
if: steps.build.outcome != 'success' | ||
run: | | ||
git push --delete origin ${GITHUB_REF#refs/tags/} | ||
exit 1 # Fail the workflow | ||
- name: Build Changelog | ||
id: gen_changelog | ||
uses: mikepenz/release-changelog-builder-action@v5 | ||
with: | ||
failOnError: "true" | ||
configuration: .github/workflows/release_config.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: build/libs/*.jar | ||
body: ${{ steps.gen_changelog.outputs.changelog }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "## 🚀 Features", | ||
"labels": ["kind/feature", "enhancement"] | ||
}, | ||
{ | ||
"title": "## 🐛 Fixes", | ||
"labels": ["fix", "bug"] | ||
}, | ||
{ | ||
"title": "## ♻️ Refactoring", | ||
"labels": ["refactoring"] | ||
}, | ||
{ | ||
"title": "## ⚡️ Performance Improvements", | ||
"labels": ["performance"] | ||
}, | ||
{ | ||
"title": "## \uD83D\uDCDA Documentation", | ||
"labels": ["documentation", "doc"] | ||
}, | ||
{ | ||
"title": "## \uD83D\uDEA6 Tests", | ||
"labels": ["test"] | ||
}, | ||
{ | ||
"title": "## \uD83D\uDEE0 Other Updates", | ||
"labels": ["other", "kind/dependency-change"] | ||
} | ||
], | ||
"ignore_labels": [ | ||
"ignore" | ||
] | ||
} |
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