mirror of
https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
synced 2026-03-22 06:15:10 +08:00
feat(流水线): github的流水线配置
This commit is contained in:
46
.github/workflows/release.yml
vendored
46
.github/workflows/release.yml
vendored
@@ -10,44 +10,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 拉取源码
|
- name: 拉取源码
|
||||||
- uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# 安装JDK环境
|
|
||||||
- name: Set up JDK 1.8
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 1.8
|
|
||||||
# 设置Maven中央仓库配置
|
|
||||||
- name: Set up Apache Maven Central
|
- name: Set up Apache Maven Central
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
server-id: releases
|
distribution: 'temurin'
|
||||||
# Nexus用户名环境变量
|
cache: maven
|
||||||
server-username: MAVEN_USERNAME
|
server-id: central
|
||||||
# Nexus密码环境变量
|
server-username: ${{ secrets.OSSRH_USER }}
|
||||||
server-password: MAVEN_CENTRAL_TOKEN
|
server-password: ${{ secrets.OSSRH_PASSWORD }}
|
||||||
# gpg短密码环境变量
|
gpg-passphrase: ${{ secrets.GPG_PASSWORD }}
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
|
||||||
# gpg私钥
|
|
||||||
gpg-private-key: ${{ secrets.GPG_SECRET }}
|
gpg-private-key: ${{ secrets.GPG_SECRET }}
|
||||||
# 推送jar包至maven中央仓库
|
|
||||||
- name: Publish to Apache Maven Central
|
- name: Publish to Apache Maven Central
|
||||||
# 执行maven deploy命令
|
run: mvn clean deploy
|
||||||
run: mvn clean deploy
|
|
||||||
# 环境变量设置
|
|
||||||
env:
|
|
||||||
# Nexus用户名,如果觉得不想暴露也可以配置到secrets中
|
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
|
|
||||||
# Nexus密码
|
|
||||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
|
|
||||||
# gpg短密码
|
|
||||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
|
|
||||||
# Nexus自动部署
|
|
||||||
- name: Release on nexus
|
|
||||||
uses: monkeyWie/maven-nexus-release@v1
|
|
||||||
with:
|
|
||||||
# Nexus用户名
|
|
||||||
maven-repo-server-username: ${{ secrets.OSSRH_USER }}
|
|
||||||
# Nexus密码
|
|
||||||
maven-repo-server-password: ${{ secrets.OSSRH_PASSWORD }}
|
|
||||||
Reference in New Issue
Block a user