Skip to content

Commit

Permalink
Merge pull request #115 from codellm-devkit/114-add-release-automation
Browse files Browse the repository at this point in the history
Create release.yml
  • Loading branch information
rahlk authored Feb 11, 2025
2 parents c5e9d1d + 63215aa commit d8c6fac
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
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 }}
35 changes: 35 additions & 0 deletions .github/workflows/release_config.json
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"
]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

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

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

Before you begin, ensure you have met the following requirements:
Expand Down

0 comments on commit d8c6fac

Please sign in to comment.