Skip to content

release version 3.0.2 #47

release version 3.0.2

release version 3.0.2 #47

Workflow file for this run

name: Publish package to the Maven Central Repository
# Run workflow on commits to the `main` branch
on:
push:
tags: "RELEASE-*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "info"
type: choice
options:
- error
- warning
- info
jobs:
publish:
runs-on: ubuntu-latest
env:
MVN_OPT: "--errors --no-transfer-progress --batch-mode"
BUILD_OPT: "-Dmaven.test.skip=true -P publish"
MVN_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MVN_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Java and Maven
uses: actions/setup-java@v4.5.0
with:
java-version: 17
distribution: "temurin"
server-id: central
server-username: MVN_NEXUS_USERNAME
server-password: MVN_NEXUS_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
cache: "maven"
- name: Package & Install to Local Repository
run: |
touch /home/runner/.m2/settings-security.xml
# 定义项目数组
projects=(
"dino-dependencies-root"
"dino-spring-assembly"
"dino-spring-boot-starter-parent"
"dino-spring-cloud-starter-parent"
"dino-spring-commons"
"dino-spring-data"
"dino-spring-auth"
"dino-spring-core"
)
# 循环遍历项目数组
for project in "${projects[@]}"; do
# 进入项目目录
cd "$project"
# 输出开始打包信息
echo "=============== 开始打包 $project ==============="
# 执行mvn命令
mvn clean package install $MVN_OPT $BUILD_OPT
# 返回到上一级目录
cd ..
done
echo "所有项目打包完成。"
- name: Publish to Maven Central
run: |
echo "=============== 开始发布到Maven中央仓库 ==============="
# 定义项目数组
projects=(
"dino-dependencies-root"
"dino-spring-assembly"
"dino-spring-boot-starter-parent"
"dino-spring-cloud-starter-parent"
"dino-spring-commons"
"dino-spring-data"
"dino-spring-auth"
"dino-spring-core"
)
# 循环遍历项目数组
for project in "${projects[@]}"; do
# 进入项目目录
cd "$project"
# 输出开始发布信息
echo "=============== 开始发布 $project ==============="
# 执行mvn命令
mvn deploy $MVN_OPT $BUILD_OPT $DEPLOY_OPT
# 返回到上一级目录
cd ..
done
echo "所有项目发布完成。"