Skip to content

Commit 3a9bf70

Browse files
author
Noodlefishh
committed
Correction tag - release
1 parent 993e069 commit 3a9bf70

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7-
workflow_dispatch:
87

98
permissions:
109
contents: write
@@ -13,6 +12,8 @@ jobs:
1312
build:
1413
name: Build Release Artifacts
1514
runs-on: ubuntu-latest
15+
# Only run on tag pushes
16+
if: startsWith(github.ref, 'refs/tags/v')
1617

1718
steps:
1819
- name: Checkout code
@@ -27,7 +28,14 @@ jobs:
2728

2829
- name: Extract version from tag
2930
id: version
30-
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
31+
run: |
32+
if [[ "$GITHUB_REF" =~ ^refs/tags/v(.*)$ ]]; then
33+
echo "VERSION=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
34+
echo "✅ Building version: ${BASH_REMATCH[1]}"
35+
else
36+
echo "❌ Not a valid version tag: $GITHUB_REF"
37+
exit 1
38+
fi
3139
3240
- name: Build with Maven
3341
run: mvn clean package -DskipTests

0 commit comments

Comments
 (0)