z-ai-sdk-java/.github/workflows/release.yml
tomsun28 0b09e46478
init: initial the repo (#1)
* init project

* init project

* init project

* init project

* init project

* init project

* update action

* update action

* update action

* update action

* java format

* java format

* update code and format

* update code and format

* update code and format

* update code and format

* update code and format

* update code and format

* update version

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish

* fix publish
2025-07-12 14:30:39 +08:00

32 lines
956 B
YAML

name: Publish package to the Maven Central Repository
on:
release:
types: [created]
workflow_dispatch:
jobs:
pre-build:
uses:
./.github/workflows/build.yml
publish-release:
needs:
- pre-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Publish package to Maven Central
run: mvn --batch-mode clean deploy -P release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}