-
Notifications
You must be signed in to change notification settings - Fork 9
26 lines (26 loc) · 1.21 KB
/
publish.yml
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
name: Publish
on:
push:
branches: [master]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Decode GPG Key
run: |
mkdir -p ~/.gradle/
echo "${{secrets.PGP_SECRET}}" | base64 --decode > ~/.gradle/secring.key
gpg --batch --pinentry-mode=loopback --yes --passphrase ${{ secrets.PGP_PASSPHRASE }} --import ~/.gradle/secring.key
gpg --batch --pinentry-mode=loopback --yes --passphrase ${{ secrets.PGP_PASSPHRASE }} --export-secret-key 5B6BE1966878E3AE16B85BC975B8BA741462DEA9 > ~/.gradle/secring.gpg
- name: Publish
run: |
JAVA_OPTS="--enable-preview" ./gradlew build -x test
JAVA_OPTS="--enable-preview" ./gradlew publishToSonatype -x test -Psigning.keyId=1462DEA9 -Psigning.password=${{secrets.PGP_PASSPHRASE}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) closeAndReleaseStagingRepository --warn --stacktrace
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}