diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 0000000..ca45a03 --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,38 @@ +name: Publish Snapshot builds + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + publish: + name: Snapshot build and publish + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3.6.0 + + - name: Set up JDK 17 + uses: actions/setup-java@v3.13.0 + with: + distribution: 'zulu' + java-version: 17 + + - name: Grant Permission to Execute Gradle + run: chmod +x gradlew + + - name: Release build + run: ./gradlew assemble --scan + + - name: Publish to MavenCentral + run: | + ./gradlew publishAllPublicationsToMavenCentral --no-daemon --no-parallel + 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 }} + SNAPSHOT: true \ No newline at end of file