-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.21 KB
/
clean_build.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
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
#Run JDK configuration
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
#Gradle cache configuration
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
#Authorizing gradlew files
- name: Grant execute permission for gradlew
run: chmod +x gradlew
#After decoding the secret key, place the file in ~ /. Gradle/ secring.gpg
- name: Decode
run: |
echo "${{secrets.SEC_RING_B64}}" > secring.gpg.b64
base64 -d secring.gpg.b64 > secring.gpg
#Publish project
- name: Publish
run: ./gradlew clean build -PnexusUsername=${{secrets.NEXUSUSERNAME}} -PnexusPassword=${{secrets.NEXUSPASSWORD}} -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{secrets.SIGNING_PASSWORD}} -Psigning.secretKeyRingFile=$(echo secring.gpg)