Skip to content

feat: 测试

feat: 测试 #19

Workflow file for this run

name: WeChat MiniProgram Demo CI/CD
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
secrets: read

Check failure on line 12 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / WeChat MiniProgram Demo CI/CD

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 12, Col: 3): Unexpected value 'secrets'
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Clone submodule
run: git submodule status
- name: Install dependencies
run: npm install
- name: Run package script
run: npm run init
- name: Upload MiniProgram
env:
WX_PRIVATE_KEY: ${{ secrets.WX_PRIVATE_KEY }}
run: |
# 验证密钥是否为空
if [ -z "$WX_PRIVATE_KEY" ]; then
echo "❌ 错误: WX_PRIVATE_KEY 为空,请检查 GitHub Secrets 设置"
exit 1
fi
mkdir -p ./build
echo "$WX_PRIVATE_KEY" > ./build/key
echo "$WX_PRIVATE_KEY" | xxd