fix(ci): pin PyArmor 8.5.3 and obfuscate scripts one file per gen

Made-with: Cursor
This commit is contained in:
2026-04-05 09:22:11 +08:00
parent 9230ce64e9
commit 3ee09bbd73

View File

@@ -34,14 +34,20 @@ jobs:
steps: steps:
- uses: http://120.25.191.12:3000/admin/actions-checkout@v4 - uses: http://120.25.191.12:3000/admin/actions-checkout@v4
# Pin PyArmor 8.5.3 — matches desktop python_env; PyArmor 9.x trial often fails on multi-file gen. # Pin PyArmor 8.5.3 — PyArmor 9.x trial hits "out of license" on multi-file gen in CI.
- name: Setup Tools - name: Setup Tools
run: pip install "pyarmor==8.5.3" requests python-frontmatter --break-system-packages -i https://pypi.tuna.tsinghua.edu.cn/simple run: pip install "pyarmor==8.5.3" requests python-frontmatter --break-system-packages -i https://pypi.tuna.tsinghua.edu.cn/simple
# One script per pyarmor invocation (same pattern as desktop tooling); avoids trial limits on batch gen.
- name: Encrypt Source Code - name: Encrypt Source Code
run: | run: |
mkdir -p dist/package mkdir -p dist/package
pyarmor gen --platform "${PYARMOR_PLATFORM}" -O dist/package scripts/*.py set -euo pipefail
for f in scripts/*.py; do
if [ -f "$f" ]; then
pyarmor gen --platform "${PYARMOR_PLATFORM}" -O dist/package "$f"
fi
done
cp SKILL.md dist/package/ cp SKILL.md dist/package/
- name: Parse Metadata and Pack - name: Parse Metadata and Pack