- 删除了 security/keys.json 配置文件 - 删除了 security/revocation.json 撤销列表文件 - 从 GitHub Actions 工作流中移除了安全文件签名步骤 - 更新了工作流中的 git add 命令,不再包含安全文件 - 删除了 sign-security.sh 签名脚本文件
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Sign Plugins
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'plugins/**/*.js'
|
|
- 'plugins/**/manifest.json'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sign:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.21'
|
|
|
|
- name: Build signtool
|
|
run: go build -o signtool ./tools/signtool
|
|
|
|
- name: Sign plugins
|
|
env:
|
|
SIGNING_KEY: ${{ secrets.PLUGIN_SIGNING_KEY }}
|
|
run: |
|
|
echo "$SIGNING_KEY" > /tmp/private.key
|
|
chmod 600 /tmp/private.key
|
|
bash scripts/sign-all.sh /tmp/private.key
|
|
rm -f /tmp/private.key
|
|
|
|
- name: Install jq
|
|
run: sudo apt-get update && sudo apt-get install -y jq
|
|
|
|
- name: Generate store.json
|
|
run: bash scripts/generate-store.sh > store.json
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "actions@github.com"
|
|
git add -A "plugins/**/*.sig" store.json
|
|
git diff --staged --quiet || git commit -m "chore: update signatures and store"
|
|
git push
|