-
-
Notifications
You must be signed in to change notification settings - Fork 49
42 lines (40 loc) · 1.29 KB
/
release_sdk.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: Release SDK
on:
push:
tags:
- 'sdk_*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 1.8
- name: Install GNUPG2 & Import Key
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
run: |
sudo apt-get install gnupg2 -y
gpg2 --version
echo "$GPG_PRIVATE_KEY" > secret.key
echo "Importing GPG Key..."
gpg2 --import --batch secret.key &> /dev/null
echo "[ OK ] GPG Key imported."
echo "Sending public key to the server..."
gpg2 --keyserver hkps://keys.openpgp.org --send-keys $GPG_KEY_ID
echo "[ OK ] Public key was sent to the server."
rm secret.key
- name: Deploy & Release
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
gradle wrapper
./gradlew :danger-kotlin-sdk:publish
./gradlew closeAndReleaseRepository