Skip to content

chore(main): release 0.1.3-SNAPSHOT (#153) #105

chore(main): release 0.1.3-SNAPSHOT (#153)

chore(main): release 0.1.3-SNAPSHOT (#153) #105

name: Run Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
release-type: maven
default-branch: main
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
snapshot-deploy:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created == false }}
steps:
- name: Check out src from Git
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Full private key blob
gpg-passphrase: GPG_PASS
- name: Deploy with Maven
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASS: ${{ secrets.SIGN_KEY_PASS }} # Password chosen when creating the GPG key
release-deploy:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Check out src from Git
uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Full private key blob
gpg-passphrase: GPG_PASS
- name: Deploy with Maven
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
GPG_PASS: ${{ secrets.SIGN_KEY_PASS }} # Password chosen when creating the GPG key