forked from allure-framework/allure-maven
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.1 KB
/
publish.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
name: Publish Release
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8.0.x
- name: Set up Maven
uses: s4u/[email protected]
with:
servers: '[{"id": "ossrh", "username": "${{secrets.OSSRH_USERNAME}}", "password": "${{secrets.OSSRH_PASSWORD}}"}]'
- name: Set up GPG
run: |
export GPG_TTY=$(tty)
echo -n "${GPG_PRIVATE_KEY}" | base64 --decode | gpg --batch --import
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: "Maven Build"
run: ./mvnw -Dinvoker.skip=true install
- name: "Maven Publish"
run: |
./mvnw -Dinvoker.skip=true -Pgpg deploy \
-Dgpg.keyname=${GPG_KEY_ID} \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}