-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.55 KB
/
release.yaml
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
42
name: Release
on:
workflow_dispatch
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'adopt'
# - name: Validate Gradle wrapper
# uses: gradle/wrapper-validation-action@v1
# - run: ./gradlew clean build --stacktrace
release:
runs-on: ubuntu-latest
# if: success() && github.ref == 'refs/heads/github-release'
# needs: build
env:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
#After decoding the secret key, place the file in ~/.gradle/secring.gpg
- name: Decode
run: |
mkdir ~/.gradle
echo "${{secrets.SIGNING_KEY_RING_FILE}}" > ~/.gradle/secring.gpg.b64
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
- run: ./gradlew clean build publishToSonatype -no-daemon --no-parallel -x test --stacktrace -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password='${{secrets.SIGNING_PASSWORD}}' -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg)