Skip to content

Create release.yml #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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