Skip to content

Commit 339ad74

Browse files
authored
Merge pull request #2872 from smallrye/backport_new_release_process
Backport new release process
2 parents 8427a52 + 1dfeef3 commit 339ad74

File tree

50 files changed

+493
-442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+493
-442
lines changed

.github/project.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: SmallRye Reactive Messaging
2+
release:
3+
previous-version: 4.24.0
4+
current-version: 4.24.1-RC1
5+
next-version: 4.24.2-SNAPSHOT

.github/workflows/build-pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
pull_request:
66
branches:
77
- main
8-
- 3.x
9-
- 3.13.x
8+
- 4.x
9+
- 4.24.x
1010

1111
jobs:
1212
build:
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Prepare Release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
paths:
8+
- '.github/project.yml'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
prepare-release:
16+
name: Prepare Release
17+
if: ${{ github.event.pull_request.merged == true}}
18+
uses: smallrye/.github/.github/workflows/prepare-release.yml@main
19+
secrets: inherit
20+
21+
after-release:
22+
name: After release
23+
needs: prepare-release
24+
runs-on: ubuntu-latest
25+
if: ${{ github.event.pull_request.merged == true}}
26+
27+
steps:
28+
- name: Create GitHub App Token
29+
id: app-token
30+
uses: actions/create-github-app-token@v1
31+
with:
32+
app-id: ${{ vars.CI_APP_ID }}
33+
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
34+
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ github.ref }}
39+
token: ${{steps.app-token.outputs.token}}
40+
41+
- name: Java setup
42+
uses: actions/setup-java@v4
43+
with:
44+
java-version: '21'
45+
distribution: 'temurin'
46+
cache: maven
47+
48+
- name: Tools setup
49+
run: |
50+
curl -s "https://get.sdkman.io" | bash
51+
source ~/.sdkman/bin/sdkman-init.sh && sdk install jbang
52+
53+
- name: Get GitHub App User ID
54+
id: get-user-id
55+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
56+
env:
57+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
58+
59+
- name: Configure Git author
60+
run: |
61+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
62+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
63+
64+
- name: Update files
65+
shell: bash -ieo pipefail {0}
66+
run: |
67+
echo "✅ Clear RevAPI justifications, if any"
68+
jbang .build/CompatibilityUtils.java clear
69+
if [[ $(git diff --stat) != '' ]]; then
70+
git add -A
71+
git status
72+
git commit -m "[POST-RELEASE] - Clearing breaking change justifications"
73+
git push
74+
else
75+
echo "No justifications cleared"
76+
fi
Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
1-
name: Deploy Docs Smallrye Reactive Messaging
1+
name: Deploy Docs
2+
run-name: Deploy ${{github.event.inputs.version || github.ref_name}} Docs
23

34
on:
45
workflow_dispatch:
56
inputs:
67
version:
78
description: 'Release version'
9+
type: string
10+
workflow_call:
811

912
jobs:
1013
deploy-docs:
1114
runs-on: ubuntu-latest
1215
env:
13-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
14-
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
1516
RELEASE_VERSION: ${{ github.event.inputs.version }}
1617

1718
steps:
1819
- name: Git checkout
1920
uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 0
22-
token: ${{ secrets.RELEASE_TOKEN }}
23+
2324
- name: Java setup
2425
uses: actions/setup-java@v4
2526
with:
26-
java-version: '17'
27+
java-version: '21'
2728
distribution: 'temurin'
2829
cache: maven
30+
2931
- name: Install just
3032
uses: taiki-e/install-action@just
33+
3134
- name: Setup Python
3235
uses: actions/setup-python@v5
3336
with:
3437
python-version: 3.9
3538
cache: 'pipenv'
3639
cache-dependency-path: documentation/Pipfile.lock
40+
3741
- name: Install pipenv
3842
run: pip install pipenv
43+
3944
- name: Set Release Version
4045
run: |
4146
echo "RELEASE_VERSION=${RELEASE_VERSION:-"$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)"}" >> $GITHUB_ENV
42-
- name: Perform the deploy docs
47+
48+
- name: Git user setup
4349
run: |
44-
just build-ci deploy-docs
50+
git config --global user.name "SmallRye CI"
51+
git config --global user.email "[email protected]"
52+
53+
- name: Perform the deploy docs
54+
run: just build-ci deploy-docs ${{ env.RELEASE_VERSION }}

.github/workflows/push-release-to-maven-central.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 27 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,35 @@
1-
name: Release Smallrye Reactive Messaging
1+
name: Release
2+
run-name: Perform ${{github.event.inputs.tag || github.ref_name}} Release
23

34
on:
5+
push:
6+
tags:
7+
- '*'
48
workflow_dispatch:
59
inputs:
6-
previousVersion:
7-
description: 'Previous version'
10+
tag:
11+
description: 'Tag to release'
812
required: true
9-
version:
10-
description: 'Release version'
11-
required: true
12-
deployWebsite:
13-
description: 'Shall we deploy the website?'
14-
required: true
15-
default: 'true'
16-
clearRevAPI:
17-
description: 'Shall we clear RevAPI justifications?'
18-
required: true
19-
default: 'true'
13+
14+
permissions:
15+
attestations: write
16+
id-token: write
17+
# Needed for the publish-* workflows
18+
contents: write
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
2023

2124
jobs:
22-
release:
23-
runs-on: ubuntu-latest
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
26-
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
27-
RELEASE_VERSION: ${{ github.event.inputs.version }}
28-
DEPLOY_WEBSITE: ${{ github.event.inputs.deployWebsite }}
29-
CLEAR_REVAPI: ${{ github.event.inputs.clearRevAPI }}
30-
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
31-
JRELEASER_TAG_NAME: ${{ github.event.inputs.version }}
32-
JRELEASER_PREVIOUS_TAG_NAME: ${{ github.event.inputs.previousVersion }}
33-
JRELEASER_GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
25+
perform-release:
26+
name: Perform Release
27+
uses: smallrye/.github/.github/workflows/perform-release.yml@main
28+
secrets: inherit
29+
with:
30+
version: ${{github.event.inputs.tag || github.ref_name}}
3431

35-
steps:
36-
- name: Git checkout
37-
uses: actions/checkout@v4
38-
with:
39-
fetch-depth: 0
40-
token: ${{ secrets.RELEASE_TOKEN }}
41-
- name: Java setup
42-
uses: actions/setup-java@v4
43-
with:
44-
java-version: '17'
45-
distribution: 'temurin'
46-
cache: maven
47-
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
48-
gpg-passphrase: 'MAVEN_GPG_PASSPHRASE'
49-
- name: Install just
50-
uses: taiki-e/install-action@just
51-
- name: Setup Python
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version: 3.9
55-
cache: 'pipenv'
56-
cache-dependency-path: documentation/Pipfile.lock
57-
- name: Install pipenv
58-
run: pip install pipenv
59-
- name: Perform the release steps
60-
run: |
61-
curl -s "https://get.sdkman.io?rcupdate=false" | bash
62-
source ~/.sdkman/bin/sdkman-init.sh && sdk install jbang
63-
just perform-release
32+
deploy-site:
33+
name: GitHub Pages
34+
needs: perform-release
35+
uses: ./.github/workflows/push-deploy-docs.yml
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Review Release
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/project.yml'
7+
8+
jobs:
9+
review-release:
10+
name: Review release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Retrieve project metadata
15+
id: metadata
16+
uses: radcortez/project-metadata-action@main
17+
with:
18+
github-token: ${{secrets.GITHUB_TOKEN}}
19+
metadata-file-path: '.github/project.yml'
20+
21+
- name: Validate version
22+
if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
23+
run: |
24+
echo '::error::Cannot release a SNAPSHOT version.'
25+
exit 1
26+
27+
- name: Milestone review
28+
uses: radcortez/milestone-review-action@main
29+
with:
30+
github-token: ${{secrets.GITHUB_TOKEN}}
31+
milestone-title: ${{steps.metadata.outputs.current-version}}

RELEASING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Releasing SmallRye Reactive Messaging
2+
3+
The release process starts by creating PR with a release branch.
4+
5+
The release branch contains a change to `.github/project.yml` setting the `current-version` to the release version.
6+
7+
## Review the release PR
8+
9+
On creation the release PR is verified for the `current-version` and whether the milestone contains any open issues or PRs.
10+
11+
## Prepare the release
12+
13+
Once the release PR is merged, the prepare release workflow is triggered.
14+
15+
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.
16+
17+
It also closes the milestone associated with the release.
18+
19+
Then the workflow clears any RevAPI justifications and pushes the changes to the target branch (main in regular releases).
20+
21+
## Perform the release
22+
23+
The release workflow is triggered on a push of a new tag (created by the prepare step).
24+
25+
It deploys artifacts locally and attaches them to the action artifacts.
26+
And publishes artifacts to the Maven Central using the Smallrye Release workflow.
27+
28+
When the Maven Central sync is complete, it deploys the website.
29+

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.smallrye.reactive</groupId>
77
<artifactId>smallrye-reactive-messaging</artifactId>
8-
<version>999-SNAPSHOT</version>
8+
<version>4.24.1-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>smallrye-reactive-messaging-api</artifactId>

documentation/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>io.smallrye.reactive</groupId>
99
<artifactId>smallrye-reactive-messaging</artifactId>
10-
<version>999-SNAPSHOT</version>
10+
<version>4.24.1-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>documentation</artifactId>
@@ -239,6 +239,13 @@
239239
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
240240
</configuration>
241241
</plugin>
242+
<plugin>
243+
<groupId>org.apache.maven.plugins</groupId>
244+
<artifactId>maven-deploy-plugin</artifactId>
245+
<configuration>
246+
<skip>true</skip>
247+
</configuration>
248+
</plugin>
242249
</plugins>
243250
</build>
244251

0 commit comments

Comments
 (0)