Skip to content

v0.1.1

v0.1.1 #5

Workflow file for this run

name: Build JAR
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Set version in pom.xml
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v} # Remove 'v' prefix if present
mvn versions:set -DnewVersion=$VERSION
- name: Build with Maven
run: mvn clean package
- name: Upload JAR
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/ShellApiLogOptimizer-${{ github.ref_name }}.jar
asset_name: ShellApiLogOptimizer-${{ github.ref_name }}.jar
asset_content_type: application/java-archive