-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (41 loc) · 1.85 KB
/
publish-to-ossrh.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: "Publish To OSSRH"
on:
push:
branches: [ develop, "*.*.*" ]
jobs:
publish:
name: "Publish To OSSRH"
runs-on: ubuntu-latest
steps:
# step 1
- name: "Checkout"
uses: actions/[email protected]
# step 2
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 8
server-id: ossrh
server-username: OSSRH_USERNAME # Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
server-password: OSSRH_PASSWORD # Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE # Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE
# step 3
- name: "Print maven version"
run: |
mvn -version
# step 4
- name: "Install pinentry"
run: |
sudo apt-get install pinentry-curses
# step 5
- name: "Publish-To-OSSRH"
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mvn -T 4C clean deploy -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn ||
mvn -T 4C clean deploy -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn ||
mvn -T 4C clean deploy -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;