Skip to content

Commit

Permalink
Deploy snapshots to Sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenStack committed Aug 28, 2024
1 parent 35d44fa commit 30d0af3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/snapshot-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Gradle Publish to Maven Central

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'
- name: Set outputs
id: vars
run: |
echo "short_commit_hash=${GITHUB_SHA::10}" >> $GITHUB_OUTPUT
- name: Publish to Sonatype
run: |
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
echo "Version: ${SHORT_COMMIT_HASH}" >> $GITHUB_STEP_SUMMARY

0 comments on commit 30d0af3

Please sign in to comment.