Files
plugin-library/.gitea/workflows/.gitlab-ci.yml
root 44567c10e4
Some checks failed
Plugin Library CI / publish (00.BuildOriginality) (push) Has been cancelled
Plugin Library CI / publish (00.StaryEvo) (push) Has been cancelled
Plugin Library CI / publish (00.StaryEvoTools) (push) Has been cancelled
Plugin Library CI / publish (01.HybridCLR) (push) Has been cancelled
Plugin Library CI / publish (10.StoryEditor) (push) Has been cancelled
Plugin Library CI / publish (10.XNode) (push) Has been cancelled
Plugin Library CI / publish (11.PointCloudTools) (push) Has been cancelled
Plugin Library CI / publish (02.InformationSave) (push) Has been cancelled
Plugin Library CI / publish (03.YooAsset) (push) Has been cancelled
Plugin Library CI / publish (04.AudioCore) (push) Has been cancelled
Plugin Library CI / publish (05.TableTextConversion) (push) Has been cancelled
Plugin Library CI / publish (06.UIFarme) (push) Has been cancelled
Plugin Library CI / publish (07.RKTools) (push) Has been cancelled
Plugin Library CI / publish (08.UniTask) (push) Has been cancelled
Plugin Library CI / publish (09.CodeChecker) (push) Has been cancelled
Plugin Library CI / publish (00.ARMazTools) (push) Has been cancelled
更新 .gitea/workflows/.gitlab-ci.yml
2026-04-11 13:13:52 +08:00

83 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
container:
image: node:18-slim
strategy:
fail-fast: false
max-parallel: 4
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:
# 关键:必须先安装 GitDebian 用 apt-get不是 apk
- name: Install Git
run: |
apt-get update && apt-get install -y git
git --version
- name: Clone with Sparse Checkout
run: |
git init
git remote add origin http://106.52.62.106:3000/root/plugin-library.git
git config core.sparseCheckout true
# 只检出目标模块
mkdir -p .git/info
echo "Assets/${{ matrix.module }}/*" > .git/info/sparse-checkout
# 部分克隆:只拉取当前提交的元数据,不拉历史文件
git fetch --depth=1 --filter=blob:none origin ${{ github.sha }}
git checkout ${{ github.sha }}
echo "已检出:"
ls -la Assets/${{ matrix.module }}/
- name: Setup Node.js
run: |
ln -sf /srv/18-alpine/bin/node /usr/bin/node 2>/dev/null || true
ln -sf /srv/18-alpine/bin/npm /usr/bin/npm 2>/dev/null || true
node -v
- name: Publish ${{ matrix.module }}
working-directory: Assets/${{ matrix.module }}
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "发布 ${{ matrix.module }}@$CURRENT_VERSION"
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 }} 完成 ======"