-
Notifications
You must be signed in to change notification settings - Fork 11
29 lines (29 loc) · 911 Bytes
/
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
name: Publish package to the Maven Central Repository
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
server-id: nexus-releases
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
# - name: Debug true
# env:
# AAA: asdada
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
# run: |
# echo "AAA: $AAA"
# echo "MAVEN_USERNAME: $MAVEN_USERNAME"
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: mvn install deploy -Drepo.login=$MAVEN_USERNAME -Drepo.pwd=$MAVEN_PASSWORD