Skip to content

Commit 9802739

Browse files
Fix release flow
1 parent 66d7f75 commit 9802739

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
echo "Error: Git tag ($RELEASE_VERSION) does not match pom.xml version ($POM_VERSION)"
4040
exit 1
4141
fi
42+
43+
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
4244
shell: bash
4345

4446
- name: Set up Git
@@ -48,19 +50,12 @@ jobs:
4850
4951
- name: Update pom.xml to release version
5052
run: |
51-
mvn versions:set -DnewVersion=${RELEASE_VERSION} -B -q
52-
git commit -am "Set version to ${RELEASE_VERSION}" || echo "No changes"
53+
mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }} -B -q
54+
git commit -am "Set version to ${{ env.RELEASE_VERSION }}" || echo "No changes"
5355
git push origin HEAD:main
5456
env:
5557
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5658

57-
- name: Extract release version
58-
run: |
59-
TAG_NAME=${GITHUB_REF_NAME}
60-
VERSION=${TAG_NAME#v}
61-
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
62-
shell: bash
63-
6459
- name: Run tests
6560
run: mvn clean verify -B
6661

@@ -73,7 +68,7 @@ jobs:
7368

7469
- name: Bump to next patch snapshot
7570
run: |
76-
CURRENT=${RELEASE_VERSION}
71+
CURRENT=${{ env.RELEASE_VERSION }}
7772
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
7873
NEXT_PATCH=$((PATCH+1))
7974
NEXT_VERSION="$MAJOR.$MINOR.$NEXT_PATCH-SNAPSHOT"

0 commit comments

Comments
 (0)