Skip to content

limiter Deploy

limiter Deploy #8

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: limiter Deploy
on:
release:
types: [ created ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build with Maven
run: mvn clean && mvn -Possrh,!nexus-dev -B -Dmaven.test.skip=true install --file admin4j-dependencies/pom.xml && mvn -B -Possrh,!nexus-dev -Dmaven.test.skip=true package --file admin4j-limiter/pom.xml
- name: Set up Apache Maven Central
run: mvn deploy -Possrh -Dmaven.test.skip=true deploy --file admin4j-limiter/pom.xml
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GITHUB_TOKEN: ${{ github.token }}
# GPG_PRIVATE_KEY:
# -----BEGIN PGP PRIVATE KEY BLOCK-----
# ***
# -----END PGP PRIVATE KEY BLOCK-----
# GPG_PASSWORD GPG_PRIVATE_KEY 的密码