-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.11 KB
/
maven_deploy.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
name: Deploy Snapshot
on:
workflow_dispatch:
branches:
- 'master'
-
jobs:
deploy:
name: Deploy Snapshot
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'main'
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Install gpg secret key
run: |
export GPG_TTY=$(tty)
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish to Maven Central repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
cat ~/.m2/settings.xml
echo $MAVEN_USERNAME
echo $MAVEN_PASSWORD
mvn \
--no-transfer-progress \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_PASSPHRASE }} \
clean deploy