Skip to content

Rerun CI (#17)

Rerun CI (#17) #39

Workflow file for this run

name: Main CI (Release)
on:
push:
branches:
- main
jobs:
build:
permissions:
contents: read
packages: write
uses: ./.github/workflows/build.yml
deploy:
needs: build
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'corretto'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Set GPG Key for Signing
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
echo "default-key ${GPG_KEY_ID}" >> ~/.gnupg/gpg.conf
echo "use-agent" >> ~/.gnupg/gpg.conf
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Set Git user for release
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Grant execute permission for Maven Wrapper
run: chmod +x ./mvnw
- name: Bump Version and Release (Maven Release Plugin)
run: |
echo "Releasing and bumping version..."
./mvnw \
-Darguments=-DskipTests \
-Dgpg.keyname=${{ secrets.GPG_KEY_ID }} \
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
release:prepare release:perform -B -P release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}