Skip to content

chore(main): release 0.0.2-SNAPSHOT (#16) #12

chore(main): release 0.0.2-SNAPSHOT (#16)

chore(main): release 0.0.2-SNAPSHOT (#16) #12

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
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
java-release:
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: ${{ secrets.OSSRH_USERNAME }} # username for Sonatype JIRA login
server-password: ${{ secrets.OSSRH_TOKEN }} # password for Sonatype JIRA login
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Full private key blob
gpg-passphrase: ${{ secrets.SIGN_KEY_PASS }} # Password chosen when creating the GPG key
- name: Cache Maven packages
uses: actions/cache@v3.3.1
with:
path: ~/.m2
key: ${{ runner.os }}-java-17-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-java-17-m2
- name: Deploy with Maven
run: |
mvn --batch-mode \
--settings release/m2-settings.xml \
clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}