mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Maven Central Repo Deployment
|
|
# 当 release 的时候触发
|
|
#on:
|
|
# release:
|
|
# types: [released]
|
|
on:
|
|
push:
|
|
branches: [ release ]
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Maven Central Repo
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
server-id: sonatype-nexus-staging
|
|
server-username: MAVEN_USERNAME
|
|
server-password: MAVEN_PASSWORD
|
|
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
|
- id: install-secret-key
|
|
name: Install GPG Secret Key
|
|
run: |
|
|
cat <(echo -e "${{ secrets.GPG_PUB }}") | gpg --batch --import
|
|
gpg --list-secret-keys --keyid-format LONG
|
|
- id: publish-to-central
|
|
name: Publish to Maven Central Repo
|
|
env:
|
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
|
|
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
|
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
|
|
run: |
|
|
mvn \
|
|
--no-transfer-progress \
|
|
--batch-mode \
|
|
-Dgpg.passphrase=${{ secrets.GPG_PASSWORD }} \
|
|
clean deploy
|