-
Notifications
You must be signed in to change notification settings - Fork 125
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
Modernize the release workflows #1361
Merged
jponge
merged 1 commit into
smallrye:main
from
jponge:ci/ripolinage-jreleaser-le-retour
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Should be run as: | ||
# just -f .build/justfile-for-release -d . (...) | ||
|
||
# Just echo the purpose of this file | ||
purpose: | ||
@echo "This file is used to automate some release tasks" | ||
@echo "(running in `pwd`)" | ||
|
||
# Perform a release | ||
perform-release: pre-release release post-release | ||
@echo "🎉 Successfully released Mutiny ${RELEASE_VERSION} 🚀" | ||
|
||
# Decrypt secrets | ||
decrypt-secrets: | ||
@echo "Decrypting smallrye signature" | ||
gpg --quiet --batch --yes --decrypt --passphrase="${SECRET_FILES_PASSPHRASE}" \ | ||
--output smallrye-sign.asc .build/smallrye-sign.asc.gpg | ||
@echo "Decrypting Maven settings" | ||
gpg --quiet --batch --yes --decrypt --passphrase="${SECRET_FILES_PASSPHRASE}" \ | ||
--output maven-settings.xml .build/maven-settings.xml.gpg | ||
|
||
# Initialize GnuPG | ||
init-gpg: | ||
@echo "GnuPG setup" | ||
gpg --fast-import --no-tty --batch --yes smallrye-sign.asc | ||
|
||
# Initialize Git | ||
init-git: | ||
@echo "Git setup" | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "smallrye@googlegroups.com" | ||
|
||
# Steps before releasing | ||
pre-release: decrypt-secrets init-gpg init-git | ||
@echo "🚀 Pre-release steps..." | ||
@echo "Pre-release verifications" | ||
jbang .build/PreRelease.java --token=${RELEASE_TOKEN} --release-version=${RELEASE_VERSION} | ||
@echo "Bump project version to ${RELEASE_VERSION}" | ||
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false | ||
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DgenerateBackupPoms=false -pl bom | ||
jbang .build/UpdateDocsAttributesFiles.java --mutiny-version=${VERSION} | ||
.build/update-workshop-target-version.sh "${VERSION}" | ||
@echo "Check that the project builds (no tests)" | ||
./mvnw --settings maven-settings.xml --batch-mode --no-transfer-progress clean install -Prelease -DskipTests | ||
@echo "Check that the website builds" | ||
[[ ${DEPLOY_WEBSITE} == "true" ]] && cd documentation && pipenv run mkdocs build | ||
|
||
# Steps to release | ||
release: pre-release | ||
@echo "🚀 Release steps..." | ||
@echo "Commit release version and push upstream" | ||
git commit -am "chore(release): release Mutiny ${RELEASE_VERSION}" | ||
git push | ||
@echo "Call JReleaser" | ||
./mvnw -settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress -Pjreleaser jreleaser:full-release -pl :mutiny-project | ||
@echo "Deploy to Maven Central" | ||
./mvnw --settings maven-settings.xml --batch-mode --no-transfer-progress deploy -Prelease -DskipTests | ||
@echo "Bump to 999-SNAPSHOT and push upstream" | ||
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false | ||
./mvnw --settings .build/maven-ci-settings.xml --batch-mode --no-transfer-progress versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false -pl bom | ||
git commit -am "chore(release): set development version to 999-SNAPSHOT" | ||
git push | ||
|
||
# Steps post-release | ||
post-release: | ||
@echo "🚀 Post-release steps..." | ||
[[ ${CLEAR_REVAPI} == "true" ]] && just -f .build/justfile-for-release -d . clear-revapi | ||
[[ ${DEPLOY_WEBSITE} == "true" ]] && .build/deploy-site.sh | ||
|
||
# Clear RevAPI justifications | ||
clear-revapi: | ||
#!/usr/bin/env bash | ||
jbang .build/CompatibilityUtils.java clear --version="${RELEASE_VERSION}" --do-not-clear-version-prefix="1." | ||
if [[ $(git diff --stat) != '' ]]; then | ||
git add -A | ||
git status | ||
git commit -m "chore(release): clear RevAPI breaking change justifications" | ||
git push | ||
else | ||
echo "No justifications cleared" | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This could be in the
justfile
(was done in a separate PR)