Skip to content

Commit 0fcc9d0

Browse files
committed
fix: properly retrieve branch name to pass to release BOM step
1 parent 7de5923 commit 0fcc9d0

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.github/workflows/release-project-in-dir.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737
env:
3838
RELEASE_VERSION: ${{ github.event.release.tag_name }}
3939

40-
- name: Release Maven package
41-
uses: samuelmeuli/action-maven-publish@v1
42-
with:
43-
maven_profiles: "release"
44-
maven_args: ${{ env.MAVEN_ARGS }}
45-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
46-
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
47-
nexus_username: ${{ secrets.OSSRH_USERNAME }}
48-
nexus_password: ${{ secrets.OSSRH_TOKEN }}
40+
# - name: Release Maven package
41+
# uses: samuelmeuli/action-maven-publish@v1
42+
# with:
43+
# maven_profiles: "release"
44+
# maven_args: ${{ env.MAVEN_ARGS }}
45+
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
46+
# gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
47+
# nexus_username: ${{ secrets.OSSRH_USERNAME }}
48+
# nexus_password: ${{ secrets.OSSRH_TOKEN }}
4949

5050
# This is separate job because there were issues with git after release step, was not able to commit changes.
5151
update-working-version:
@@ -64,18 +64,17 @@ jobs:
6464
distribution: temurin
6565
cache: 'maven'
6666

67-
- name: Change version to release version
67+
- name: Update version to new SNAPSHOT version
6868
run: |
69-
mvn ${MAVEN_ARGS} versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit
70-
mvn ${MAVEN_ARGS} -q build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit
69+
mvn ${MAVEN_ARGS} build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit
7170
git config --local user.email "action@github.com"
7271
git config --local user.name "GitHub Action"
73-
git commit -m "Set new SNAPSHOT version into pom files." -a
72+
# git commit -m "Set new SNAPSHOT version into pom files." -a
7473
env:
7574
RELEASE_VERSION: ${{ github.event.release.tag_name }}
7675

77-
- name: Push changes to branch
78-
uses: ad-m/github-push-action@master
79-
with:
80-
branch: "${{inputs.version_branch}}"
81-
github_token: ${{ secrets.GITHUB_TOKEN }}
76+
# - name: Push changes to branch
77+
# uses: ad-m/github-push-action@master
78+
# with:
79+
# branch: "${{inputs.version_branch}}"
80+
# github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
project_dir: '.'
4848

4949
release-bom:
50-
needs: release-sdk
50+
needs: [ prepare-release, release-sdk ] # needs prepare-release to be able to get the proper version branch name
5151
uses: ./.github/workflows/release-project-in-dir.yml
5252
secrets: inherit
5353
with:

0 commit comments

Comments
 (0)