更新 .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 }}
|
AuthToken: ${{ vars.AUTH_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# 定义所有模块矩阵
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: dev # 对应你的 GitLab runner tag
|
runs-on: dev
|
||||||
container:
|
container:
|
||||||
image: node:18-slim
|
image: node:18-slim
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4 # 关键:同时只跑 2 个模块,其余排队
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
module:
|
module:
|
||||||
- 00.StaryEvo
|
- 00.StaryEvo
|
||||||
@@ -39,31 +38,29 @@ jobs:
|
|||||||
- 11.PointCloudTools
|
- 11.PointCloudTools
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
#- name: Install Git
|
# 修正:正确的缩进和结构
|
||||||
# run: |
|
- name: Clone from Local Mirror
|
||||||
# apk add --no-cache git
|
run: |
|
||||||
# git --version # 验证
|
# 检查宿主机是否有镜像(需在 runner 上预置)
|
||||||
- name: Clone from Local Mirror
|
if [ -d "/srv/cache/plugin-library.git" ]; then
|
||||||
run: |
|
echo "使用本地裸库镜像..."
|
||||||
# 检查宿主机是否有镜像(需在 runner 上预置)
|
git clone --reference /srv/cache/plugin-library.git \
|
||||||
if [ -d "/srv/cache/plugin-library.git" ]; then
|
--depth=1 --filter=blob:none \
|
||||||
echo "使用本地裸库镜像..."
|
--sparse \
|
||||||
git clone --reference /srv/cache/plugin-library.git \
|
http://106.52.62.106:3000/root/plugin-library.git .
|
||||||
--depth=1 --filter=blob:none \
|
else
|
||||||
--sparse \
|
echo "首次克隆,创建本地镜像..."
|
||||||
http://106.52.62.106:3000/root/plugin-library.git .
|
git clone --bare \
|
||||||
else
|
http://106.52.62.106:3000/root/plugin-library.git \
|
||||||
echo "首次克隆,创建本地镜像..."
|
/srv/cache/plugin-library.git || true
|
||||||
git clone --bare \
|
git clone --reference /srv/cache/plugin-library.git \
|
||||||
http://106.52.62.106:3000/root/plugin-library.git \
|
--depth=1 --filter=blob:none \
|
||||||
/srv/cache/plugin-library.git || true
|
--sparse . .
|
||||||
git clone --reference /srv/cache/plugin-library.git \
|
fi
|
||||||
--depth=1 --filter=blob:none \
|
|
||||||
--sparse . .
|
# 配置稀疏检出
|
||||||
fi
|
git sparse-checkout set Assets/${{ matrix.module }}
|
||||||
|
|
||||||
# 配置稀疏检出
|
|
||||||
git sparse-checkout set Assets/${{ matrix.module }}
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
run: |
|
run: |
|
||||||
ln -sf /srv/18-alpine/bin/node /usr/bin/node
|
ln -sf /srv/18-alpine/bin/node /usr/bin/node
|
||||||
@@ -74,19 +71,13 @@ jobs:
|
|||||||
working-directory: Assets/${{ matrix.module }}
|
working-directory: Assets/${{ matrix.module }}
|
||||||
run: |
|
run: |
|
||||||
echo "开始发布 ${{ matrix.module }}"
|
echo "开始发布 ${{ matrix.module }}"
|
||||||
|
|
||||||
# 获取当前版本
|
|
||||||
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
||||||
echo "当前版本: $CURRENT_VERSION"
|
echo "当前版本: $CURRENT_VERSION"
|
||||||
|
|
||||||
# 配置 npm registry
|
npm config set registry "http://${SERVER_HOST}/npm"
|
||||||
echo "registry=http://${SERVER_HOST}/npm" > .npmrc
|
npm config set "//${SERVER_HOST}/:_authToken" "${AuthToken}"
|
||||||
echo "//${SERVER_HOST}/:_authToken=${AuthToken}" >> .npmrc
|
|
||||||
|
|
||||||
# 发布
|
npm publish || echo "发布失败或版本已存在"
|
||||||
npm publish || echo "发布失败,继续执行"
|
|
||||||
|
|
||||||
echo "${{ matrix.module }} 构建完成"
|
|
||||||
|
|
||||||
- name: Complete
|
- name: Complete
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user