-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.03 KB
/
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
name: deploy
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# 拉取源码
- uses: actions/checkout@v2
# Cache maven .m2 directory
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# 安装JDK环境
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# 推送jar包至maven中央仓库
- name: Publish to Apache Maven Central
uses: samuelmeuli/[email protected]
with:
# Nexus用户名环境变量
nexus_username: ${{ secrets.MAVEN_USERNAME }}
# Nexus密码环境变量
nexus_password: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
# gpg短密码环境变量
gpg_passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# gpg私钥
gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}