Skip to content

5.4.421

5.4.421 #33

Workflow file for this run

name: Publish to Central
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
settings-path: "~" # location for the settings.xml file
cache: 'maven'
- name: Build and publish
run: |
set -e
revision=${GITHUB_REF##*/}
echo "Publishing version $revision to Central"
echo ${{ secrets.GPG_SECRETKEYS }} | base64 --decode | $GPG_EXECUTABLE --import --no-tty --batch --yes
echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | $GPG_EXECUTABLE --import-ownertrust --no-tty --batch --yes
mvn -Prelease,delombok -B deploy -s $GITHUB_WORKSPACE/settings.xml -Drevision=$revision -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
env:
GITHUB_TOKEN: ${{ github.token }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_EXECUTABLE: gpg
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Update READMEs
run: |
set -e
revision=${GITHUB_REF##*/}
echo "Updating READMEs"
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" README.md
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" transactionoutbox-guice/README.md
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" transactionoutbox-jackson/README.md
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" transactionoutbox-jooq/README.md
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" transactionoutbox-spring/README.md
sed -i "s_\(<version>\)[^<]*_\1${revision}_g" transactionoutbox-quarkus/README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-core:\)[^']*_\1${revision}_g" README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-guice:\)[^']*_\1${revision}_g" transactionoutbox-guice/README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-jackson:\)[^']*_\1${revision}_g" transactionoutbox-jackson/README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-jooq:\)[^']*_\1${revision}_g" transactionoutbox-jooq/README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-spring:\)[^']*_\1${revision}_g" transactionoutbox-spring/README.md
sed -i "s_\(implementation 'com.gruelbox:transactionoutbox-quarkus:\)[^']*_\1${revision}_g" transactionoutbox-quarkus/README.md
- name: Create version update pull request
uses: gruelbox/create-pull-request@master
with:
commit-message: "Update versions in READMEs [skip ci]"
title: Update versions in READMEs
body: Updates the versions in the README files following the release
branch: update-readme-version
base: master
author: GitHub <[email protected]>