-
Notifications
You must be signed in to change notification settings - Fork 43
35 lines (33 loc) · 1.01 KB
/
Copy pathpublish-to-maven-central.yml
File metadata and controls
35 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish to Maven Central
on:
release:
types: [ created ]
workflow_dispatch:
jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Workflow
uses: timheuer/base64-to-file@v1.1
with:
fileName: 'secring.gpg'
fileDir: ${{github.workspace}}/keys
encodedString: ${{secrets.SIGNING_SECRET_KEY_RING_FILE}}
- name: Publish
uses: gradle/gradle-build-action@v2
with:
arguments: |
publish
-PsonatypePassword=${{secrets.SONATYPE_PASSWORD}}
-Psigning.keyId=${{secrets.SIGNING_KEYID}}
-Psigning.secretKeyRingFile=${{github.workspace}}/keys/secring.gpg
-Psigning.password=${{secrets.SIGNING_PASSWORD}}