-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (39 loc) · 1.49 KB
/
release.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
43
44
45
46
47
name: Release to Mave
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
env:
TAG: ${{ github.event.release.tag_name }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_EXECUTABLE: ${{ secrets.GPG_EXECUTABLE }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
steps:
- name: Use checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: Import GPG keys
run: |
echo $GPG_SECRET_KEYS | base64 --decode | gpg --batch --import
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust
- name: Build with Jacoco
run: mvn --settings scripts/settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent package org.jacoco:jacoco-maven-plugin:report
- name: Deploy
run: |
gpg --list-secret-keys
export GPG_TTY=$(tty)
echo "test" | gpg --clearsign
chmod +x scripts/deploy.sh
./scripts/deploy.sh