Skip to content

v5.2.12

v5.2.12 #10

Workflow file for this run

name: Publish package to the Maven Central Repository
on:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Maven
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
server-id: 'central'
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# 使用无密码 GPG 密钥,无需配置 passphrase
- name: Publish package
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.CENTRAL_TOKEN }}
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_PASSWORD }} clean deploy -am -pl jiguang-sdk -X