更新 .gitea/workflows/.gitlab-ci.yml
Some checks failed
Plugin Library CI / publish (00.BuildOriginality) (push) Failing after 1s
Plugin Library CI / publish (00.StaryEvo) (push) Failing after 1s
Plugin Library CI / publish (00.StaryEvoTools) (push) Failing after 1s
Plugin Library CI / publish (01.HybridCLR) (push) Failing after 1s
Plugin Library CI / publish (02.InformationSave) (push) Failing after 1s
Plugin Library CI / publish (03.YooAsset) (push) Failing after 1s
Plugin Library CI / publish (04.AudioCore) (push) Failing after 1s
Plugin Library CI / publish (08.UniTask) (push) Failing after 1s
Plugin Library CI / publish (09.CodeChecker) (push) Failing after 1s
Plugin Library CI / publish (10.StoryEditor) (push) Failing after 1s
Plugin Library CI / publish (10.XNode) (push) Failing after 1s
Plugin Library CI / publish (11.PointCloudTools) (push) Failing after 1s
Plugin Library CI / publish (00.ARMazTools) (push) Failing after 1s
Plugin Library CI / publish (05.TableTextConversion) (push) Failing after 1s
Plugin Library CI / publish (06.UIFarme) (push) Failing after 1s
Plugin Library CI / publish (07.RKTools) (push) Failing after 1s
Some checks failed
Plugin Library CI / publish (00.BuildOriginality) (push) Failing after 1s
Plugin Library CI / publish (00.StaryEvo) (push) Failing after 1s
Plugin Library CI / publish (00.StaryEvoTools) (push) Failing after 1s
Plugin Library CI / publish (01.HybridCLR) (push) Failing after 1s
Plugin Library CI / publish (02.InformationSave) (push) Failing after 1s
Plugin Library CI / publish (03.YooAsset) (push) Failing after 1s
Plugin Library CI / publish (04.AudioCore) (push) Failing after 1s
Plugin Library CI / publish (08.UniTask) (push) Failing after 1s
Plugin Library CI / publish (09.CodeChecker) (push) Failing after 1s
Plugin Library CI / publish (10.StoryEditor) (push) Failing after 1s
Plugin Library CI / publish (10.XNode) (push) Failing after 1s
Plugin Library CI / publish (11.PointCloudTools) (push) Failing after 1s
Plugin Library CI / publish (00.ARMazTools) (push) Failing after 1s
Plugin Library CI / publish (05.TableTextConversion) (push) Failing after 1s
Plugin Library CI / publish (06.UIFarme) (push) Failing after 1s
Plugin Library CI / publish (07.RKTools) (push) Failing after 1s
This commit is contained in:
@@ -10,15 +10,14 @@ env:
|
||||
AuthToken: ${{ vars.AUTH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
# 定义所有模块矩阵
|
||||
publish:
|
||||
runs-on: dev # 对应你的 GitLab runner tag
|
||||
runs-on: dev
|
||||
container:
|
||||
image: node:18-slim
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4 # 关键:同时只跑 2 个模块,其余排队
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
module:
|
||||
- 00.StaryEvo
|
||||
@@ -39,31 +38,29 @@ jobs:
|
||||
- 11.PointCloudTools
|
||||
|
||||
steps:
|
||||
#- name: Install Git
|
||||
# run: |
|
||||
# apk add --no-cache git
|
||||
# git --version # 验证
|
||||
- name: Clone from Local Mirror
|
||||
run: |
|
||||
# 检查宿主机是否有镜像(需在 runner 上预置)
|
||||
if [ -d "/srv/cache/plugin-library.git" ]; then
|
||||
echo "使用本地裸库镜像..."
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse \
|
||||
http://106.52.62.106:3000/root/plugin-library.git .
|
||||
else
|
||||
echo "首次克隆,创建本地镜像..."
|
||||
git clone --bare \
|
||||
http://106.52.62.106:3000/root/plugin-library.git \
|
||||
/srv/cache/plugin-library.git || true
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse . .
|
||||
fi
|
||||
|
||||
# 配置稀疏检出
|
||||
git sparse-checkout set Assets/${{ matrix.module }}
|
||||
# 修正:正确的缩进和结构
|
||||
- name: Clone from Local Mirror
|
||||
run: |
|
||||
# 检查宿主机是否有镜像(需在 runner 上预置)
|
||||
if [ -d "/srv/cache/plugin-library.git" ]; then
|
||||
echo "使用本地裸库镜像..."
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse \
|
||||
http://106.52.62.106:3000/root/plugin-library.git .
|
||||
else
|
||||
echo "首次克隆,创建本地镜像..."
|
||||
git clone --bare \
|
||||
http://106.52.62.106:3000/root/plugin-library.git \
|
||||
/srv/cache/plugin-library.git || true
|
||||
git clone --reference /srv/cache/plugin-library.git \
|
||||
--depth=1 --filter=blob:none \
|
||||
--sparse . .
|
||||
fi
|
||||
|
||||
# 配置稀疏检出
|
||||
git sparse-checkout set Assets/${{ matrix.module }}
|
||||
|
||||
- name: Setup Node.js
|
||||
run: |
|
||||
ln -sf /srv/18-alpine/bin/node /usr/bin/node
|
||||
@@ -74,20 +71,14 @@ jobs:
|
||||
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 }} 构建完成"
|
||||
|
||||
npm config set registry "http://${SERVER_HOST}/npm"
|
||||
npm config set "//${SERVER_HOST}/:_authToken" "${AuthToken}"
|
||||
|
||||
npm publish || echo "发布失败或版本已存在"
|
||||
|
||||
- name: Complete
|
||||
if: always()
|
||||
run: echo "====== ${{ matrix.module }} 发布完成 ========="
|
||||
run: echo "====== ${{ matrix.module }} 发布完成 ========="
|
||||
Reference in New Issue
Block a user