-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 2.2 KB
/
release.yml
File metadata and controls
75 lines (62 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Generate changelog
run: |
./scripts/generate-changelog.sh ${{ github.event.inputs.version }}
# Commit the changes
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "chore: update changelog for ${{ github.event.inputs.version }}"
git push
- 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 }}"
body_path: CHANGELOG.md
fail_on_unmatched_files: true
files: |
pattern-tracker/target/PatternTracker.bwextension
midi-splitter/target/MidiSplitter.bwextension
step-recorder/target/StepRecorder.bwextension