{"id":31637753,"url":"https://github.com/version-fox/plugin-manifest-action","last_synced_at":"2025-10-07T01:39:50.963Z","repository":{"id":317187777,"uuid":"1066322266","full_name":"version-fox/plugin-manifest-action","owner":"version-fox","description":"The action to generate manifest of plugin and release.","archived":false,"fork":false,"pushed_at":"2025-09-29T11:18:31.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T13:12:00.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/version-fox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-29T10:29:39.000Z","updated_at":"2025-09-29T11:18:35.000Z","dependencies_parsed_at":"2025-10-01T07:31:14.615Z","dependency_job_id":null,"html_url":"https://github.com/version-fox/plugin-manifest-action","commit_stats":null,"previous_names":["version-fox/plugin-manifest-action"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/version-fox/plugin-manifest-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/version-fox%2Fplugin-manifest-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/version-fox%2Fplugin-manifest-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/version-fox%2Fplugin-manifest-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/version-fox%2Fplugin-manifest-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/version-fox","download_url":"https://codeload.github.com/version-fox/plugin-manifest-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/version-fox%2Fplugin-manifest-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708068,"owners_count":26031932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T01:39:24.198Z","updated_at":"2025-10-07T01:39:50.955Z","avatar_url":"https://github.com/version-fox.png","language":"Lua","readme":"# Plugin Manifest Action\n\n用于 vfox 插件的 GitHub Action，自动生成和发布插件 manifest 文件和发布包。\n\n## 功能特性\n\n- 🚀 自动生成 manifest.json 文件\n- 📦 自动打包插件文件\n- 🏷️ 支持 tag 推送触发发布\n- 🔀 支持 PR 合并触发发布（通过 PR 标题识别版本号）\n- ⚙️ 可配置的参数\n\n## 使用方法\n\n### 1. 作为 Composite Action 使用\n\n在你的仓库中创建 workflow 文件（如 `.github/workflows/publish.yml`）：\n\n#### 方式 A：直接使用（推荐）\n\n```yaml\nname: Publish Plugin\n\non:\n  push:\n    tags: ['v*']\n\npermissions:\n  contents: write\n\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n        \n      - name: Extract version\n        run: |\n          VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)\n          echo \"VERSION=$VERSION\" \u003e\u003e $GITHUB_ENV\n          \n      - name: Publish manifest and release\n        uses: version-fox/plugin-manifest-action@main\n        with:\n          version: ${{ env.VERSION }}\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n#### 方式 B：指定完整路径\n\n```yaml\n      - name: Publish manifest and release\n        uses: version-fox/plugin-manifest-action/.github/actions/publish-manifest@main\n        with:\n          version: ${{ env.VERSION }}\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### 2. 完整的 Workflow 模板\n\n复制 `.github/workflows/publish-manifest.yml` 到你的仓库，支持：\n\n- **Tag 推送触发**: 推送 `v1.2.3` 格式的 tag 自动发布\n- **PR 合并触发**: PR 标题为 `Release v1.2.3` 格式时，合并后自动发布\n\n```yaml\nname: Generate and Publish Manifest\n\non:\n  push:\n    tags: [ 'v*' ]\n  pull_request:\n    types: [closed]\n    branches: [main, master]\n\npermissions:\n  contents: write\n\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push' || (github.event.pull_request.merged == true \u0026\u0026 startsWith(github.event.pull_request.title, 'Release v'))\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Extract version from tag\n        if: github.event_name == 'push'\n        run: |\n          VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3 | cut -c2-)\n          echo \"VERSION=$VERSION\" \u003e\u003e $GITHUB_ENV\n\n      - name: Extract version from PR title\n        if: github.event_name == 'pull_request'\n        run: |\n          PR_TITLE=\"${{ github.event.pull_request.title }}\"\n          VERSION=$(echo \"$PR_TITLE\" | grep -oP 'Release v\\K[0-9]+\\.[0-9]+\\.[0-9]+')\n          echo \"VERSION=$VERSION\" \u003e\u003e $GITHUB_ENV\n\n      - name: Validate version\n        run: |\n          if [[ ! \"$VERSION\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]]; then\n            echo \"Invalid version format: $VERSION\"\n            exit 1\n          fi\n          echo \"Publishing version: $VERSION\"\n\n      - name: Publish manifest and release\n        uses: version-fox/plugin-manifest-action@main\n        with:\n          version: ${{ env.VERSION }}\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## 输入参数\n\n| 参数 | 描述 | 必需 | 默认值 |\n|------|------|------|--------|\n| `version` | 要发布的版本号（不包含 v 前缀） | ✅ | - |\n| `github-token` | GitHub token 用于发布 release | ✅ | `${{ github.token }}` |\n| `lua-version` | Lua 版本 | ❌ | `5.3.5` |\n| `exclude-files` | 压缩时排除的文件（glob 模式） | ❌ | `*.git* manifest.json` |\n\n## 输出参数\n\n| 参数 | 描述 |\n|------|------|\n| `manifest-path` | 生成的 manifest.json 文件路径 |\n| `zip-path` | 生成的压缩包文件路径 |\n\n## 前置条件\n\n你的插件仓库需要包含：\n\n1. **metadata.lua** 文件 - 定义了 `PLUGIN` 全局变量，包含插件元数据\n2. **有效的 Lua 代码** - action 会使用 Lua 加载 metadata 文件\n\nmetadata.lua 示例：\n```lua\nPLUGIN = {\n    name = \"my-plugin\",\n    author = \"your-name\",\n    version = \"1.0.0\",\n    description = \"Plugin description\",\n    -- 其他元数据...\n}\n```\n\n## 触发方式\n\n### 1. Tag 推送\n```bash\ngit tag v1.2.3\ngit push origin v1.2.3\n```\n\n### 2. PR 合并\n创建标题为 `Release v1.2.3` 的 PR，合并后自动触发发布流程。\n\n## 发布内容\n\nAction 会创建以下内容：\n\n1. **Plugin Release** - 标签为 `v{version}`，包含插件压缩包\n2. **Manifest Release** - 标签为 `manifest`，包含 manifest.json 文件\n3. **Artifacts** - 在 workflow 运行中保存 manifest.json 文件\n\n## 许可证\n\nApache 2.0 License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fversion-fox%2Fplugin-manifest-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fversion-fox%2Fplugin-manifest-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fversion-fox%2Fplugin-manifest-action/lists"}