Skip to content

Commit

Permalink
ci: Add jobs to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinah95 committed Nov 17, 2023
1 parent 1f1c0c8 commit fd62505
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,41 @@ name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
pr: ${{ steps.release.outputs.pr }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}
if: ${{ steps.release.outputs.releases_created }}
publish:
runs-on: macos-latest
if: ${{ needs.release.outputs.releases_created }}
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 11

- name: Grant Permission to Execute Gradle
run: chmod +x gradlew

- name: Release build
run: ./gradlew assemble

- name: Publish to MavenCentral
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}

0 comments on commit fd62505

Please sign in to comment.