ci: recursive PyArmor for scripts/ and copy references/assets; release.ps1 preflight check
Made-with: Cursor
This commit is contained in:
11
.github/workflows/reusable-release-skill.yaml
vendored
11
.github/workflows/reusable-release-skill.yaml
vendored
@@ -58,17 +58,16 @@ jobs:
|
||||
python -c "import os,base64,pathlib,subprocess; p=pathlib.Path('/tmp/pyarmor-reg.zip'); p.write_bytes(base64.standard_b64decode(os.environ['PYARMOR_REG_B64'])); subprocess.run(['pyarmor','reg',str(p)],check=True); p.unlink(missing_ok=True)"
|
||||
fi
|
||||
|
||||
# One script per pyarmor invocation (matches common desktop usage).
|
||||
# 递归加密整个 scripts/(含 cli、service、db、util 等子包);仅 scripts/*.py 会漏模块导致运行时 ModuleNotFoundError。
|
||||
- name: Encrypt Source Code
|
||||
run: |
|
||||
mkdir -p dist/package
|
||||
set -euo pipefail
|
||||
for f in scripts/*.py; do
|
||||
if [ -f "$f" ]; then
|
||||
pyarmor gen --platform "${PYARMOR_PLATFORM}" -O dist/package "$f"
|
||||
fi
|
||||
done
|
||||
test -d scripts
|
||||
( cd scripts && pyarmor gen --platform "${PYARMOR_PLATFORM}" -r -O ../dist/package . )
|
||||
cp SKILL.md dist/package/
|
||||
if [ -d references ]; then cp -r references dist/package/; fi
|
||||
if [ -d assets ]; then cp -r assets dist/package/; fi
|
||||
|
||||
- name: Parse Metadata and Pack
|
||||
id: build_task
|
||||
|
||||
Reference in New Issue
Block a user