-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: sauce-visual-bot <[email protected]> Co-authored-by: Félix P. <[email protected]>
- Loading branch information
1 parent
6fd7f94
commit 45796fc
Showing
2 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,30 +30,23 @@ jobs: | |
server-id: ossrh | ||
server-username: MVN_CENTRAL_USERNAME | ||
server-password: MVN_CENTRAL_PASSWORD | ||
|
||
- name: Setup Git | ||
if: ${{ steps.prep.outputs.tag_name == '' }} | ||
run: | | ||
git config --global user.name "sauce-visual-bot" | ||
git config --global user.email "[email protected]" | ||
git config --global user.email "[email protected]" | ||
- name: upgrade & push version | ||
- name: Upgrade & Build new version | ||
id: upgrade | ||
run: | | ||
current_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | ||
new_version=$(./scripts/bump_version.sh -c $current_version -r ${{ github.event.inputs.releaseType }}) | ||
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$new_version | ||
tag_name="java-$new_version" | ||
git add ./pom.xml | ||
git commit -m "[release] $tag_name" | ||
git tag $tag_name | ||
git push | ||
git push origin $tag_name | ||
mvn -q versions:set -DgenerateBackupPoms=false -DnewVersion=$new_version | ||
echo "version=$new_version" >> "$GITHUB_OUTPUT" | ||
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT" | ||
- name: Import GPG signing key | ||
- name: Sign and upload to Maven Central | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.MVN_CENTRAL_GPG_PRIVATE_KEY }} | ||
|
@@ -67,10 +60,22 @@ jobs: | |
MVN_CENTRAL_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }} | ||
MVN_CENTRAL_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }} | ||
|
||
- name: Push new version to Git | ||
id: push_to_git | ||
run: | | ||
tag_name="java-${{ steps.upgrade.outputs.version }}" | ||
git add ./pom.xml | ||
git commit -m "[release] $tag_name" | ||
git tag $tag_name | ||
git push | ||
git push origin $tag_name | ||
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT" | ||
- name: Github Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
fail_on_unmatched_files: true | ||
tag_name: ${{ steps.upgrade.outputs.tag_name }} | ||
tag_name: ${{ steps.push_to_git.outputs.tag_name }} | ||
files: visual-java/target/java-client-${{ steps.upgrade.outputs.version }}.jar | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters