Skip to content

Publish To OSSRH - latest-SNAPSHOT #397

Publish To OSSRH - latest-SNAPSHOT

Publish To OSSRH - latest-SNAPSHOT #397

#################################################################################
# 此action会发布一个固定的 'latest-SNAPSHOT' 版本,用于 'easyj-samples' 每周自动化测试. #
#################################################################################
name: "Publish To OSSRH - latest-SNAPSHOT"
on:
schedule:
- cron: '0 0 * * *'
jobs:
publish:
name: "Publish To OSSRH - latest-SNAPSHOT"
runs-on: ubuntu-latest
steps:
# step 1
- name: "Checkout"
uses: actions/[email protected]
# step 2
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 8
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
# step 3
- name: "Print maven version"
run: |
mvn -version
# step 4
- name: "Install pinentry"
run: |
sudo apt-get update && sudo apt-get install -y pinentry-curses
# step 5
- name: "Publish-To-OSSRH"
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mvn clean deploy -Drevision=latest-SNAPSHOT -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn ||
mvn clean deploy -Drevision=latest-SNAPSHOT -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn ||
mvn clean deploy -Drevision=latest-SNAPSHOT -Ppublish-auto -Duser.timezone=GMT+0 -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;