Skip to content
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

Release CI enhancements after 2.5.0-M1 #1374

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .build/justfile-for-release
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ init-gpg:
# Initialize Git
init-git:
@echo "Git setup"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.name "smallrye-ci"
git config --global user.email "[email protected]"

# Steps before releasing
Expand All @@ -56,14 +56,17 @@ release: pre-release
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

# Deploy to Maven Central
deploy-to-maven-central: decrypt-secrets init-gpg
@echo "Deploy to Maven Central"
./mvnw --settings maven-settings.xml --batch-mode --no-transfer-progress deploy -Prelease -DskipTests

# Steps post-release
post-release:
@echo "🚀 Post-release steps..."
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
java-version: 11
distribution: temurin
cache: maven
- name: Install just
uses: taiki-e/install-action@just
- name: Build with Maven
run: ./mvnw --no-transfer-progress -s .build/maven-ci-settings.xml -B clean verify
- name: Deploy snapshots
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SECRET_FILES_PASSPHRASE: ${{ secrets.SECRET_FILES_PASSPHRASE }}
run: |
.build/decrypt-secrets.sh
.build/deploy-snapshot.sh
run: just -f .build/justfile-for-release -d . deploy-to-maven-central
25 changes: 25 additions & 0 deletions .github/workflows/push-release-to-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Push a release to Maven Central

on:
push:
tags:
- '2.*'

jobs:
release:
runs-on: ubuntu-latest
env:
SECRET_FILES_PASSPHRASE: ${{ secrets.SECRET_FILES_PASSPHRASE }}
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Java setup
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Install just
uses: taiki-e/install-action@just
- name: Deploy tp Maven Central
run: just -f .build/justfile-for-release -d . deploy-to-maven-central
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@
<contributor>dependabot[bot]</contributor>
<contributor>bot</contributor>
<contributor>jreleaserbot</contributor>
<contributor>smallrye-ci</contributor>
</contributors>
</hide>
</changelog>
Expand Down