Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action to release maven artifacts #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

unidevel
Copy link

@unidevel unidevel commented Mar 18, 2025

Inputs:
image

This action will:

  1. Create release commits and add release tag
  2. Publish maven artifacts

When any step failed, we can re-run the failed job.

Or use the checkbox to re-publish maven artifacts for current release.

@unidevel unidevel force-pushed the add_release_action branch from 8b97e3f to bcaa0de Compare March 18, 2025 20:49
git config --global user.name "prestodb-ci"
git config --global alias.ls 'log --pretty=format:"%cd %h %ce: %s" --date=short --no-merges'
git config pull.rebase false
git ls -3
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list latest 3 commits

-DautoVersionSubmodules=true \
-DgenerateBackupPoms=false
echo "RELEASE_VERSION=$(grep scm.tag= release.properties | cut -d'=' -f2)" >> $GITHUB_ENV
git ls -5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list lastest 3 commits plus 2 commits by mvn release:prepare

run: |
echo "RELEASE_VERSION=${RELEASE_VERSION}"
git checkout "${RELEASE_VERSION}"
git ls -4
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list latest 3 commts plus a maven commit

if: ${{ inputs.prepare_release }}
run: |
git checkout master
git ls -5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list the latest 3 commits plus 2 maven commits

token: ${{ secrets.PRESTODB_CI_TOKEN }}
ref: master
show-progress: false
fetch-depth: 5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep 5 commits in history

Comment on lines +49 to +52
server-id: ossrh
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET }}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generate settings.xml

Comment on lines +83 to +87
VERSION_WITHOUT_SNAPSHOT=${CURRENT_VERSION%-SNAPSHOT}
VERSION=${VERSION_WITHOUT_SNAPSHOT%.*}
RELEASE_VERSION=$((VERSION - 1))
echo "RELEASE_VERSION=${RELEASE_VERSION}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If unchecked prepare_release, will use last release as the RELEASE_VERSION

Copy link

@ZacBlanco ZacBlanco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two questions, otherwise looks good

default: true

env:
MAVEN_OPTS: "-Xmx1024m"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary?

fetch-depth: 5
fetch-tags: true

- name: Set up JDK 8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this airbase release, I think we should migrate to 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants