Skip to content

Commit

Permalink
Add GitHub action for publishing Snapshot to Sonatype Repository
Browse files Browse the repository at this point in the history
  • Loading branch information
burnoo committed Aug 3, 2024
1 parent 52ae772 commit c78ff52
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Snapshot to Sonatype repository

on:
push:
branches: ["main"]

env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

concurrency:
group: "snapshot"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish to Sonatype Snapshot repository
run: ./gradlew publishAllPublicationsToSonatypeSnapshotRepository

0 comments on commit c78ff52

Please sign in to comment.