未验证 提交 ba007c03 编写于 作者: H He Wang 提交者: GitHub

add publish snapshot action (#25)

上级 1f853910
name: Maven Build name: Maven Build
on: on:
push:
branches:
- master
pull_request: pull_request:
branches: branches:
- master - master
...@@ -20,4 +17,4 @@ jobs: ...@@ -20,4 +17,4 @@ jobs:
java-version: '8' java-version: '8'
distribution: 'zulu' distribution: 'zulu'
- name: Build with Maven - name: Build with Maven
run: mvn clean package run: mvn clean install
name: Maven Publish Snapshot
on:
push:
branches:
- master
jobs:
publish-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Apache Maven Central
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Publish to Apache Maven Central
run: mvn clean verify gpg:sign install:install deploy:deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册