deploy #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |