Skip to content

Create and Publish Release #1

Create and Publish Release

Create and Publish Release #1

Workflow file for this run

name: Create and Publish Release
on:
workflow_dispatch:
inputs:
version:
description: "The version to release (e.g., 1.0.0)"
required: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# We need the full history to properly create commits and tags
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
cache: maven
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update version in pom.xml files
run: mvn versions:set -DnewVersion=${{ github.event.inputs.version }} -DprocessAllModules=true
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Commit version bump
run: |
git add .
git commit -m "chore(release): prepare for release ${{ github.event.inputs.version }}"
- name: Create and Push Tag
run: |
git tag "v${{ github.event.inputs.version }}"
git push origin "v${{ github.event.inputs.version }}"
- name: Push version bump commit
run: git push
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ github.event.inputs.version }}"
name: "Release ${{ github.event.inputs.version }}"
fail_on_unmatched_files: true
files: |
pattern-tracker/target/PatternTracker.bwextension
midi-splitter/target/MidiSplitter.bwextension
step-recorder/target/StepRecorder.bwextension