-
Notifications
You must be signed in to change notification settings - Fork 18
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
base: master
Are you sure you want to change the base?
Conversation
8b97e3f
to
bcaa0de
Compare
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
server-id: ossrh | ||
server-username: NEXUS_USERNAME | ||
server-password: NEXUS_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_SECRET }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate settings.xml
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Inputs:

This action will:
When any step failed, we can re-run the failed job.
Or use the checkbox to re-publish maven artifacts for current release.