Skip to content

Fix publishing snapshots (#121) #60

Fix publishing snapshots (#121)

Fix publishing snapshots (#121) #60

name: Publish Snapshot
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy-maven-snapshot:
name: Deploy To Maven Snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: cache-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
restore-keys: cache-gradle-
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Deploy Snapshot
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache --no-daemon --no-parallel
- name: Stop Gradle
run: ./gradlew --stop