Skip to content

Merge branch 'release' into develop #8

Merge branch 'release' into develop

Merge branch 'release' into develop #8

Workflow file for this run

name: Release to maven central
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with: # running setup-java again overwrites the settings.xml
java-version: '17'
distribution: 'adopt'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Configure Git user
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
- name: Publish to Apache Maven Central
run: mvn -P release -B release:prepare release:perform
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- uses: actions/checkout@master
- name: Merge release -> master
uses: devmasx/merge-branch@master
with:
type: now
from_branch: release
target_branch: master
github_token: ${{ github.token }}
- name: Merge release -> development
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: develop
github_token: ${{ github.token }}