-
Notifications
You must be signed in to change notification settings - Fork 183
41 lines (33 loc) · 1.16 KB
/
gradle.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish to Maven
on:
push:
branches:
- master
- maven
env:
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }}
SIGNING_KEYID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_CONTENT: ${{ secrets.SIGNING_SECRET_KEY_RING_CONTENT }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Prepare environment
run: |
echo "$SIGNING_SECRET_KEY_RING_CONTENT" | base64 -d > publish_key.gpg
ls -al
gpg --batch --yes --decrypt --passphrase="$SECRET_PASSPHRASE" --output secret.gpg publish_key.gpg
ls -al
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
#- name: Publish with Gradle
# run: ./gradlew publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$SONATYPE_TOKEN"