Skip to content

Commit a279183

Browse files
Merge pull request #46 from IABTechLab/llp-uid2-2236-set-tag-for-changelog
Update Java shared action.
2 parents cc3c392 + 2665b3c commit a279183

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

.github/workflows/shared-java-publish-versioned-package.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,26 @@ jobs:
8686
run: mvn -B -Drepo.id=ossrh -Drepo.login=${{ secrets.SONATYPE_REPO_ACCOUNT }} -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy
8787

8888
- name: Commit pom.xml and version.json
89+
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE != 'true' }}
8990
uses: IABTechLab/uid2-shared-actions/actions/commit_pr_and_merge@main
9091
with:
9192
add: 'pom.xml version.json'
9293
message: 'Released ${{ inputs.release_type }} version: ${{ steps.version.outputs.new_version }}'
93-
tag: v${{ steps.version.outputs.new_version }}
94+
95+
- name: Commit pom.xml, version.json and set tag
96+
if: ${{ inputs.version_number_input == '' && steps.checkRelease.outputs.IS_RELEASE == 'true' }}
97+
uses: IABTechLab/uid2-shared-actions/actions/commit_pr_and_merge@main
98+
with:
99+
add: 'pom.xml version.json'
100+
message: 'Released ${{ inputs.release_type }} version: ${{ steps.version.outputs.new_version }}'
101+
tag: v${{ steps.version.outputs.new_version }}
94102

95103
- name: Build Changelog
96104
id: github_release
97105
if: ${{ env.IS_RELEASE == 'true' }}
98106
uses: mikepenz/release-changelog-builder-action@v3
99107
with:
108+
toTag: v${{ steps.version.outputs.new_version }}
100109
configurationJson: |
101110
{
102111
"template": "#{{CHANGELOG}}\n## Maven\n```\n<dependency>\n <groupId>com.uid2</groupId>\n <artifactId>${{ env.REPO }}</artifactId>\n <version>${{ steps.version.outputs.new_version }}</version>\n</dependency>\n```\n\n## Jar Files\n- [${{ env.REPO }}-${{ steps.version.outputs.new_version }}.jar](https://repo1.maven.org/maven2/com/uid2/${{ env.REPO }}/${{ steps.version.outputs.new_version }}/${{ env.REPO }}-${{ steps.version.outputs.new_version }}.jar)\n\n## Changelog\n#{{UNCATEGORIZED}}",

.github/workflows/shared-publish-docker-versioned.yaml

+1-15
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
211211
- name: Build Changelog
212212
id: github_release
213-
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' && inputs.version_number_input == '' }}
213+
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
214214
uses: mikepenz/release-changelog-builder-action@v3
215215
with:
216216
toTag: v${{ steps.version.outputs.new_version }}
@@ -222,20 +222,6 @@ jobs:
222222
env:
223223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
224224

225-
- name: Build Changelog
226-
id: github_release_specific_version
227-
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' && inputs.version_number_input != '' }}
228-
uses: mikepenz/release-changelog-builder-action@v3
229-
with:
230-
toTag: v${{inputs.version_number_input}}
231-
configurationJson: |
232-
{
233-
"template": "#{{CHANGELOG}}\n## Installation\n```\ndocker pull ${{ steps.meta.outputs.tags }}\n```\n\n## Image reference to deploy: \n```\n${{ steps.updatePom.outputs.image_tag }}\n```\n\n## Changelog\n#{{UNCATEGORIZED}}",
234-
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
235-
}
236-
env:
237-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
238-
239225
- name: Create Release
240226
if: ${{ steps.checkRelease.outputs.IS_RELEASE == 'true' }}
241227
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)