Skip to content

Commit

Permalink
Revamped release workflow (#1349)
Browse files Browse the repository at this point in the history
* First sketch of a revamped release workflow

* Enabled executable flag

* Make sure the BOM is also bumped to the next snapshot version
  • Loading branch information
jponge authored Aug 31, 2023
1 parent 7c2edae commit 88eb204
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 399 deletions.
16 changes: 16 additions & 0 deletions .build/bump-to-next-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

SNAPSHOT="${NEXT_VERSION}-SNAPSHOT"

echo "Bumping version to ${SNAPSHOT}"

./mvnw --settings .build/maven-ci-settings.xml \
--batch-mode --no-transfer-progress \
versions:set -DnewVersion=${SNAPSHOT} -DgenerateBackupPoms=false

./mvnw --settings .build/maven-ci-settings.xml \
--batch-mode --no-transfer-progress \
versions:set -DnewVersion=${SNAPSHOT} -DgenerateBackupPoms=false \
-pl bom
18 changes: 18 additions & 0 deletions .build/bump-to-release-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

echo "Bumping 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

echo "Update website version to ${RELEASE_VERSION}"

.build/UpdateDocsAttributesFiles.java --mutiny-version=${RELEASE_VERSION}
16 changes: 16 additions & 0 deletions .build/clear-revapi-justifications.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

echo "Clearing difference justifications"

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 "Clearing breaking change justifications"
git push
else
echo "No justifications cleared"
fi
79 changes: 0 additions & 79 deletions .build/cut-release.sh

This file was deleted.

22 changes: 0 additions & 22 deletions .build/deploy-release.sh

This file was deleted.

7 changes: 7 additions & 0 deletions .build/install-mkdocs-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

cd documentation
pip install pipenv
pipenv install
19 changes: 19 additions & 0 deletions .build/release-with-jreleaser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

echo "📦 Staging artifacts..."

./mvnw --settings .build/maven-ci-settings.xml \
--batch-mode --no-transfer-progress \
-Pjreleaser-staging \
-DskipTests=true -Drevapi.skip=true

echo "🚀 Releasing..."

./mvnw --settings .build/maven-ci-settings.xml \
--batch-mode --no-transfer-progress \
-pl :mutiny-project -Pjreleaser-release \
jreleaser:full-release -DskipTests=true -Drevapi.skip=true

echo "🎉 Done!"
6 changes: 6 additions & 0 deletions .build/setup-git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

git config --global user.name "smallrye[bot]"
git config --global user.email "smallrye@googlegroups.com"
7 changes: 7 additions & 0 deletions .build/setup-jbang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh
sdk install jbang
34 changes: 34 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
changelog:
exclude:
authors:
- GitHub
- dependabot[bot]
- smallrye[bot]
- jreleaserbot
- bot
categories:
- title: 🗑️ APIs deprecation or removal
labels:
- api-deprecation
- title: 👍 Promotion of experimental APIs
labels:
- api-promotion
- title: 🐛 Bugs
labels:
- bug
- title: ⚙️ CI/CD pipeline and build
labels:
- 'ci/cd/build'
- title: 📦 Dependency updates
labels:
- dependencies
- title: 📖 Documentation updates
labels:
- documentation
- title: 🚀 New features and enhancements
labels:
- enhancement
- internal
- title: 💡 Misc. updates
labels:
- "*"
20 changes: 10 additions & 10 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
java: [
Expand All @@ -21,9 +21,9 @@ jobs:
]
name: Build with Java ${{ matrix.java.version }} (OpenJDK)
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
name: set up jdk ${{matrix.java.version}}
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
name: Setup Java ${{matrix.java.version}}
with:
distribution: temurin
java-version: ${{matrix.java.version}}
Expand All @@ -36,10 +36,10 @@ jobs:
snapshot:
name: Deploy snapshots
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
Expand All @@ -55,10 +55,10 @@ jobs:
quality-and-compatibility:
name: Test coverage and compatibility checks
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
java: [
Expand All @@ -21,8 +21,8 @@ jobs:
]
name: Build with Java ${{ matrix.java.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
name: set up jdk ${{matrix.java.version}}
with:
distribution: temurin
Expand All @@ -35,11 +35,11 @@ jobs:
- name: Codecov
uses: codecov/codecov-action@v1.0.13
compatibility:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: Compatibility Check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/deploy-release.yml

This file was deleted.

Loading

0 comments on commit 88eb204

Please sign in to comment.