-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.22 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
42
43
44
45
46
name: publish
on:
workflow_dispatch:
push:
jobs:
publish:
runs-on: ubuntu-latest
container:
image: cimg/openjdk:11.0.22
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Import gpg key
run: |
echo ${{ secrets.GPG_BASE64_KEY }} | base64 -d > ./private.key
gpg --import --passphrase ${{ secrets.GPG_PASSPHRASE }} --batch --yes ./private.key
rm -f ./private.key
# - name: Copy settings.xml
# run: |
# pwd
# echo ${{ github.workspace }}
# mkdir ~/.m2
# ls -l .
# cp m2/settings.xml ~/.m2/settings.xml
# cat ~/.m2/settings.xml
- name: Deploy
run: |
mvn --settings m2/settings.xml help:effective-settings
# mvn --settings m2/settings.xml deploy
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: central-bundle
path: ${{ github.workspace }}/target/central-publishing/central-bundle.zip