-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UPDATE] 更新持续集成,自动将 central-studio-lib 发布到 Maven Central 和 GitHub Pac…
…kages 中 Signed-off-by: Alan Yeh <[email protected]>
- Loading branch information
Showing
16 changed files
with
1,482 additions
and
145 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Publish packages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- '*.x' | ||
jobs: | ||
publish-to-github-packages: | ||
name: Publish to GitHub Packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: zulu | ||
server-id: github | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: GPG_PASSPHRASE | ||
- name: Echo settings.xml | ||
run: cat /home/runner/.m2/settings.xml | ||
- name: Publish packages | ||
run: mvn -P github --batch-mode clean deploy | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.GHPKG_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.GHPKG_TOKEN }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
publish-to-maven-central: | ||
name: Publish to Maven Central | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: zulu | ||
server-id: sonatype | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: GPG_PASSPHRASE | ||
- name: Echo settings.xml | ||
run: cat /home/runner/.m2/settings.xml | ||
- name: Publish packages | ||
run: mvn -P sonatype --batch-mode clean deploy | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
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
Oops, something went wrong.