Skip to content

Commit c0e5cc6

Browse files
authored
Merge pull request #103 from ruromero/fix/publish-release
fix: version bump missing update-sources
2 parents 817898b + c4999e2 commit c0e5cc6

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,19 @@ jobs:
8282
if: github.event_name == 'workflow_run'
8383
id: releasebranch
8484
run: |
85-
echo "branch=$(cat releasebranch.txt)" >> "$GITHUB_OUTPUT"
85+
BRANCH=$(cat releasebranch.txt)
86+
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
87+
# Derive release version and tag from branch (e.g. release/v2.0.5 -> 2.0.5, ref v2.0.5)
88+
# Checkout the tag so we publish the release version (2.0.5), not the branch tip (2.0.6-SNAPSHOT)
89+
VERSION="${BRANCH#release/v}"
90+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
91+
echo "ref=v$VERSION" >> "$GITHUB_OUTPUT"
8692
rm releasebranch.txt
8793
8894
- name: Checkout
8995
uses: actions/checkout@v5
9096
with:
91-
ref: ${{ (github.event_name == 'workflow_run' && steps.releasebranch.outputs.branch) || github.ref }}
97+
ref: ${{ (github.event_name == 'workflow_run' && steps.releasebranch.outputs.ref) || github.ref }}
9298
fetch-depth: 0
9399

94100
- name: Set up Java 17

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
- name: Bump to next development version
8888
run: |
8989
mvn -B release:update-versions -DgenerateBackupPoms=false
90+
mvn -B process-resources
9091
git add -A
9192
git commit -m "build(release): bump to next development version"
9293
git push origin "release/v${{ steps.version.outputs.version }}"

0 commit comments

Comments
 (0)