-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2852 from ozangunalp/new_release_process
New release process
- Loading branch information
Showing
9 changed files
with
168 additions
and
153 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: SmallRye Reactive Messaging | ||
release: | ||
previous-version: 4.25.0 | ||
current-version: 4.26.0-RC1 | ||
next-version: 999-SNAPSHOT |
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,63 @@ | ||
name: Prepare Release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
paths: | ||
- '.github/project.yml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
prepare-release: | ||
name: Prepare Release | ||
if: ${{ github.event.pull_request.merged == true}} | ||
uses: smallrye/.github/.github/workflows/prepare-release.yml@main | ||
secrets: inherit | ||
|
||
after-release: | ||
name: After release | ||
needs: prepare-release | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged == true}} | ||
|
||
steps: | ||
- name: Create GitHub App Token | ||
id: app-token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ vars.CI_APP_ID }} | ||
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
token: ${{steps.app-token.outputs.token}} | ||
|
||
- name: Get GitHub App User ID | ||
id: get-user-id | ||
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | ||
env: | ||
GH_TOKEN: ${{ steps.app-token.outputs.token }} | ||
|
||
- name: Configure Git author | ||
run: | | ||
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' | ||
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' | ||
- name: Update files | ||
run: | | ||
echo "✅ Clear RevAPI justifications, if any" | ||
jbang .build/CompatibilityUtils.java clear | ||
if [[ $(git diff --stat) != '' ]]; then | ||
git add -A | ||
git status | ||
git commit -m "[POST-RELEASE] - Clearing breaking change justifications" | ||
git push | ||
else | ||
echo "No justifications cleared" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,37 @@ | ||
name: Release Smallrye Reactive Messaging | ||
name: Release | ||
run-name: Perform ${{github.event.inputs.tag || github.ref_name}} Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
previousVersion: | ||
description: 'Previous version' | ||
tag: | ||
description: 'Tag to release' | ||
required: true | ||
version: | ||
description: 'Release version' | ||
required: true | ||
deployWebsite: | ||
description: 'Shall we deploy the website?' | ||
required: true | ||
default: 'true' | ||
clearRevAPI: | ||
description: 'Shall we clear RevAPI justifications?' | ||
required: true | ||
default: 'true' | ||
|
||
permissions: | ||
attestations: write | ||
id-token: write | ||
# Needed for the publish-* workflows | ||
contents: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
RELEASE_VERSION: ${{ github.event.inputs.version }} | ||
DEPLOY_WEBSITE: ${{ github.event.inputs.deployWebsite }} | ||
CLEAR_REVAPI: ${{ github.event.inputs.clearRevAPI }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
JRELEASER_TAG_NAME: ${{ github.event.inputs.version }} | ||
JRELEASER_PREVIOUS_TAG_NAME: ${{ github.event.inputs.previousVersion }} | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
perform-release: | ||
name: Perform Release | ||
uses: smallrye/.github/.github/workflows/perform-release.yml@main | ||
secrets: inherit | ||
with: | ||
version: ${{github.event.inputs.tag || github.ref_name}} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
- name: Java setup | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE' | ||
- name: Install just | ||
uses: taiki-e/install-action@just | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
cache: 'pipenv' | ||
cache-dependency-path: documentation/Pipfile.lock | ||
- name: Install pipenv | ||
run: pip install pipenv | ||
- name: Perform the release steps | ||
run: | | ||
curl -s "https://get.sdkman.io?rcupdate=false" | bash | ||
source ~/.sdkman/bin/sdkman-init.sh && sdk install jbang | ||
just perform-release | ||
deploy-site: | ||
name: GitHub Pages | ||
needs: perform-release | ||
uses: ./.github/workflows/push-deploy-docs.yml | ||
with: | ||
version: ${{github.event.inputs.tag || github.ref_name}} |
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,31 @@ | ||
name: Review Release | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/project.yml' | ||
|
||
jobs: | ||
review-release: | ||
name: Review release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Retrieve project metadata | ||
id: metadata | ||
uses: radcortez/project-metadata-action@main | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
metadata-file-path: '.github/project.yml' | ||
|
||
- name: Validate version | ||
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT') | ||
run: | | ||
echo '::error::Cannot release a SNAPSHOT version.' | ||
exit 1 | ||
- name: Milestone review | ||
uses: radcortez/milestone-review-action@main | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
milestone-title: ${{steps.metadata.outputs.current-version}} |
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,29 @@ | ||
# Releasing SmallRye Reactive Messaging | ||
|
||
The release process starts by creating PR with a release branch. | ||
|
||
The release branch contains a change to `.github/project.yml` setting the `current-version` to the release version. | ||
|
||
## Review the release PR | ||
|
||
On creation the release PR is verified for the `current-version` and whether the milestone contains any open issues or PRs. | ||
|
||
## Prepare the release | ||
|
||
Once the release PR is merged, the prepare release workflow is triggered. | ||
|
||
This workflow calls the maven-release-plugin prepare goal, which sets the release version in the `pom.xml` and pushes a release tag to the repository. | ||
|
||
It also closes the milestone associated with the release. | ||
|
||
Then the workflow clears any RevAPI justifications and pushes the changes to the target branch (main in regular releases). | ||
|
||
## Perform the release | ||
|
||
The release workflow is triggered on a push of a new tag (created by the prepare step). | ||
|
||
It deploys artifacts locally and attaches them to the action artifacts. | ||
And publishes artifacts to the Maven Central using the Smallrye Release workflow. | ||
|
||
When the Maven Central sync is complete, it deploys the website. | ||
|
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