diff --git a/.github/workflows/sign.yml b/.github/workflows/sign.yml index 471dd22..92389da 100644 --- a/.github/workflows/sign.yml +++ b/.github/workflows/sign.yml @@ -31,10 +31,13 @@ jobs: bash scripts/sign-all.sh /tmp/private.key rm -f /tmp/private.key - - name: Commit signatures + - 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" - git diff --staged --quiet || git commit -m "chore: update plugin signatures" + git add -A "plugins/**/*.sig" store.json + git diff --staged --quiet || git commit -m "chore: update signatures and store" git push diff --git a/scripts/generate-store.sh b/scripts/generate-store.sh new file mode 100755 index 0000000..e407d60 --- /dev/null +++ b/scripts/generate-store.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" +STORE_FILE="$REPO_ROOT/store.json" + +echo "[" + +first=true +for manifest in "$REPO_ROOT"/plugins/*/manifest.json; do + [ -f "$manifest" ] || continue + + if [ "$first" = true ]; then + first=false + else + echo "," + fi + + cat "$manifest" +done + +echo "]" diff --git a/store.json b/store.json new file mode 100644 index 0000000..92967ca --- /dev/null +++ b/store.json @@ -0,0 +1,9 @@ +[ + { + "name": "file-manager", + "version": "1.0.0", + "type": "app", + "description": "文件管理器插件,提供远程文件浏览和管理功能", + "author": "GoTunnel Official" + } +]