Publish to maven central #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to maven central | |
on: | |
push: | |
branches: [ release/v* ] | |
workflow_dispatch: | |
#env: | |
# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
# KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
# KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout github repo | |
uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
# Decode the secring file | |
- name: Decode Secring File | |
id: decode_secring | |
uses: timheuer/[email protected] | |
with: | |
fileDir: './secrets' | |
fileName: 'secring.gpg' | |
encodedString: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | |
# generate docs | |
- name: Generate docs | |
run: ./gradlew dokkaJavadoc | |
# Build bundle and publish to Maven Central | |
- name: Build & publish to Maven Central | |
run: ./gradlew publish --no-daemon --no-parallel | |
-PmavenCentralUsername=${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
-PmavenCentralPassword=${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
-Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} | |
-Psigning.password=${{ secrets.SIGNING_PASSWORD }} | |
-Psigning.secretKeyRingFile="../${{ steps.decode_secring.outputs.filePath }}" |