Skip to content

Commit

Permalink
Merge pull request #1374 from smallrye/ci/fixes-after-2.5.0-M1
Browse files Browse the repository at this point in the history
Release CI enhancements after 2.5.0-M1
  • Loading branch information
jponge authored Sep 20, 2023
2 parents a035b5f + c43fc92 commit 75305d0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
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

0 comments on commit 75305d0

Please sign in to comment.