forked from aws/aws-advanced-jdbc-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.49 KB
/
maven_snapshot.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
42
name: 'Snapshot to Maven'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
ubuntu-latest-jdbc-wrapper-snapshot-to-maven:
name: 'Build And Upload Snapshot to Maven'
runs-on: ubuntu-latest
steps:
- name: 'Clone Repository'
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: 'Set up JDK 8'
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: 'Build Driver'
run: |
./gradlew --no-parallel --no-daemon -x test build
./gradlew --no-parallel --no-daemon -x test shadowJar
- name: "Decode Key Ring"
run: |
echo "${{secrets.GPG_SECRET_KEY_FILE}}" > ~/.gradle/secring.gpg.b64
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg
- name: 'Install GPG Secret Key'
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: 'Upload Snapshot to Maven'
run: |
./gradlew --no-parallel --no-daemon publishAllPublicationsToOSSRHRepository -Psnapshot=${{secrets.ENABLE_SNAPSHOT}} -Psigning.keyId=${{secrets.GPG_KEY_ID}} -Psigning.password=${{secrets.GPG_PASSPHRASE}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg)
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}