Some checks failed
Plugin Library CI / publish (00.ARMazTools) (push) Successful in 3m49s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 3m51s
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3m45s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 4m3s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 3m58s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3m54s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 4m41s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3m49s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 3m49s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 4m10s
Plugin Library CI / publish (07.RKTools) (push) Successful in 3m48s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3m49s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 4m9s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3m57s
Plugin Library CI / publish (11.PointCloudTools) (push) Has been cancelled
Plugin Library CI / publish (10.XNode) (push) Has been cancelled
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
name: Plugin Library CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
workflow_dispatch: # 支持手动触发
|
|
|
|
env:
|
|
SERVER_HOST: ${{ vars.SERVER_HOST }}
|
|
AuthToken: ${{ vars.AUTH_TOKEN }}
|
|
|
|
jobs:
|
|
# 定义所有模块矩阵
|
|
publish:
|
|
runs-on: dev # 对应你的 GitLab runner tag
|
|
container:
|
|
image: node:18-alpine
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 4 # 关键:同时只跑 2 个模块,其余排队
|
|
matrix:
|
|
module:
|
|
- 00.StaryEvo
|
|
- 00.StaryEvoTools
|
|
- 00.BuildOriginality
|
|
- 00.ARMazTools
|
|
- 01.HybridCLR
|
|
- 02.InformationSave
|
|
- 03.YooAsset
|
|
- 04.AudioCore
|
|
- 05.TableTextConversion
|
|
- 06.UIFarme
|
|
- 07.RKTools
|
|
- 08.UniTask
|
|
- 09.CodeChecker
|
|
- 10.StoryEditor
|
|
- 10.XNode
|
|
- 11.PointCloudTools
|
|
|
|
steps:
|
|
#- name: Install Git
|
|
# run: |
|
|
# apk add --no-cache git
|
|
# git --version # 验证
|
|
- name: Checkout
|
|
uses: http://106.52.62.106:3000/unity-registry/checkout@v4
|
|
with:
|
|
fetch-depth: 1 # 只拉取最新提交,不拉历史
|
|
single-branch: true # 只拉取当前分支
|
|
- name: Setup Node.js
|
|
run: |
|
|
ln -sf /srv/18-alpine/bin/node /usr/bin/node
|
|
ln -sf /srv/18-alpine/bin/npm /usr/bin/npm
|
|
node -v
|
|
|
|
- name: Publish ${{ matrix.module }}
|
|
working-directory: Assets/${{ matrix.module }}
|
|
run: |
|
|
echo "开始发布 ${{ matrix.module }}"
|
|
|
|
# 获取当前版本
|
|
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
echo "当前版本: $CURRENT_VERSION"
|
|
|
|
# 配置 npm registry
|
|
echo "registry=http://${SERVER_HOST}/npm" > .npmrc
|
|
echo "//${SERVER_HOST}/:_authToken=${AuthToken}" >> .npmrc
|
|
|
|
# 发布
|
|
npm publish || echo "发布失败,继续执行"
|
|
|
|
echo "${{ matrix.module }} 构建完成"
|
|
|
|
- name: Complete
|
|
if: always()
|
|
run: echo "====== ${{ matrix.module }} 发布完成 ========="
|