1 line
17 KiB
JSON
1 line
17 KiB
JSON
{"repo": "beyondtheapex/chillpatcher", "files": {".github/workflows/release.yml": {"08b26ab778cb7edaed10957c86862da711f2ff41": {"t": 1785746363.5116649, "n": 5023, "h": "4fd1ce56cbf927b7", "c": "name: AI Release\n\n# 并发控制:同一分支只保留最新\nconcurrency:\n group: release-${{ github.ref }}\n cancel-in-progress: true\n\non:\n push:\n branches: [main, master]\n workflow_dispatch:\n inputs:\n version_type:\n description: \"版本类型\"\n required: true\n type: choice\n default: \"patch\"\n options:\n - patch\n - minor\n - major\n\npermissions:\n contents: write\n actions: read\n\njobs:\n # ═══════════════════════════════════════════\n # 创建 Release(AI 生成 changelog + tag)\n # ═══════════════════════════════════════════\n release:\n runs-on: ubuntu-latest\n outputs:\n tag_name: ${{ steps.get-tag.outputs.tag }}\n created: ${{ steps.get-tag.outputs.created }}\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n # 记录 release-helper 运行前的 tag\n - name: Capture previous tag\n id: prev-tag\n run: |\n git fetch --tags\n PREV=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"prev=$PREV\" >> $GITHUB_OUTPUT\n echo \"📌 Previous tag: $PREV\"\n\n - name: AI Release\n uses: zxcloli666/release-helper@main\n with:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n OPENAI_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}\n OPENAI_API_BASE_URL: \"https://api.deepseek.com/chat/completions\"\n OPENAI_API_MODEL: \"deepseek-v4-flash\"\n LANGUAGE: \"zh\"\n VERSION_TYPE: ${{ github.event.inputs.version_type }}\n\n # 对比前后 tag,判断是否真的创建了新 release\n - name: Get release tag\n id: get-tag\n run: |\n git fetch --tags\n TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"tag=$TAG\" >> $GITHUB_OUTPUT\n if [ \"$TAG\" != \"none\" ] && [ \"$TAG\" != \"${{ steps.prev-tag.outputs.prev }}\" ]; then\n echo \"created=true\" >> $GITHUB_OUTPUT\n echo \"✅ New release created: $TAG\"\n else\n echo \"created=false\" >> $GITHUB_OUTPUT\n echo \"⏭️ No new release (commit 不含 !release: 标记)\"\n fi\n\n # ═══════════════════════════════════════════\n # 等待构建 → 下载产物 → 附加到 Release\n # ═══════════════════════════════════════════\n attach-assets:\n needs: release\n if: needs.release.outputs.created == 'true'\n runs-on: ubuntu-latest\n timeout-minutes: 120 # 等构建最多 2 小时\n steps:\n # ── 等待 Build 工作流完成(仅 push 触发时需要) ──\n # push: 等待同一次 commit 的构建完成\n # workflow_dispatch: 跳过等待,直接拿最新的成功构建产物\n - name: Wait for Build workflow\n if: github.event_name == 'push'\n uses: actions/github-script@v7\n with:\n script: |\n const maxWait = 110 * 60;\n const pollInterval = 30;\n let waited = 0;\n\n while (waited < maxWait) {\n const { data: runs } = await github.rest.actions.listWorkflowRuns({\n owner: context.repo.owner,\n repo: context.repo.repo,\n workflow_id: 'build.yml',\n head_sha: context.sha,\n per_page: 1,\n });\n\n if (runs.workflow_runs.length > 0) {\n const run = runs.workflow_runs[0];\n console.log(`Build status: ${run.status} / ${run.conclusion}`);\n if (run.status === 'completed') {\n if (run.conclusion === 'success') {\n console.log('✅ Build succeeded!');\n return;\n }\n throw new Error(`Build failed: ${run.conclusion}`);\n }\n } else {\n console.log('⏳ Build workflow not yet started...');\n }\n\n await new Promise(r => setTimeout(r, pollInterval * 1000));\n waited += pollInterval;\n }\n throw new Error('Timed out waiting for build');\n\n # ── 下载构建产物(同 commit 的构建结果) ──\n - name: Download installer\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: installer\n path: assets/\n\n - name: Download playerbuild\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: playerbuild\n path: assets/playerbuild/\n\n # ── 打包 playerbuild 为单个 zip ──\n - name: Zip playerbuild\n run: |\n if [ -d \"assets/playerbuild\" ] && [ \"$(ls -A assets/playerbuild)\" ]; then\n cd assets/playerbuild && zip -r ../OmniMixPlayer_portable.zip . && cd ../..\n echo \"✅ playerbuild zipped\"\n else\n echo \"⏭️ playerbuild empty, skipping\"\n fi\n\n # ── 附加产物到 Release(只上传 installer exe + playerbuild zip)──\n - name: Upload assets to Release\n uses: softprops/action-gh-release@v2\n with:\n tag_name: ${{ needs.release.outputs.tag_name }}\n files: |\n assets/*.exe\n assets/*.zip\n"}, "27df689aae77ddb6df486908b24945da90fd71b5": {"t": 1785762589.3481662, "n": 5023, "h": "4fd1ce56cbf927b7", "c": "name: AI Release\n\n# 并发控制:同一分支只保留最新\nconcurrency:\n group: release-${{ github.ref }}\n cancel-in-progress: true\n\non:\n push:\n branches: [main, master]\n workflow_dispatch:\n inputs:\n version_type:\n description: \"版本类型\"\n required: true\n type: choice\n default: \"patch\"\n options:\n - patch\n - minor\n - major\n\npermissions:\n contents: write\n actions: read\n\njobs:\n # ═══════════════════════════════════════════\n # 创建 Release(AI 生成 changelog + tag)\n # ═══════════════════════════════════════════\n release:\n runs-on: ubuntu-latest\n outputs:\n tag_name: ${{ steps.get-tag.outputs.tag }}\n created: ${{ steps.get-tag.outputs.created }}\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n # 记录 release-helper 运行前的 tag\n - name: Capture previous tag\n id: prev-tag\n run: |\n git fetch --tags\n PREV=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"prev=$PREV\" >> $GITHUB_OUTPUT\n echo \"📌 Previous tag: $PREV\"\n\n - name: AI Release\n uses: zxcloli666/release-helper@main\n with:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n OPENAI_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}\n OPENAI_API_BASE_URL: \"https://api.deepseek.com/chat/completions\"\n OPENAI_API_MODEL: \"deepseek-v4-flash\"\n LANGUAGE: \"zh\"\n VERSION_TYPE: ${{ github.event.inputs.version_type }}\n\n # 对比前后 tag,判断是否真的创建了新 release\n - name: Get release tag\n id: get-tag\n run: |\n git fetch --tags\n TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"tag=$TAG\" >> $GITHUB_OUTPUT\n if [ \"$TAG\" != \"none\" ] && [ \"$TAG\" != \"${{ steps.prev-tag.outputs.prev }}\" ]; then\n echo \"created=true\" >> $GITHUB_OUTPUT\n echo \"✅ New release created: $TAG\"\n else\n echo \"created=false\" >> $GITHUB_OUTPUT\n echo \"⏭️ No new release (commit 不含 !release: 标记)\"\n fi\n\n # ═══════════════════════════════════════════\n # 等待构建 → 下载产物 → 附加到 Release\n # ═══════════════════════════════════════════\n attach-assets:\n needs: release\n if: needs.release.outputs.created == 'true'\n runs-on: ubuntu-latest\n timeout-minutes: 120 # 等构建最多 2 小时\n steps:\n # ── 等待 Build 工作流完成(仅 push 触发时需要) ──\n # push: 等待同一次 commit 的构建完成\n # workflow_dispatch: 跳过等待,直接拿最新的成功构建产物\n - name: Wait for Build workflow\n if: github.event_name == 'push'\n uses: actions/github-script@v7\n with:\n script: |\n const maxWait = 110 * 60;\n const pollInterval = 30;\n let waited = 0;\n\n while (waited < maxWait) {\n const { data: runs } = await github.rest.actions.listWorkflowRuns({\n owner: context.repo.owner,\n repo: context.repo.repo,\n workflow_id: 'build.yml',\n head_sha: context.sha,\n per_page: 1,\n });\n\n if (runs.workflow_runs.length > 0) {\n const run = runs.workflow_runs[0];\n console.log(`Build status: ${run.status} / ${run.conclusion}`);\n if (run.status === 'completed') {\n if (run.conclusion === 'success') {\n console.log('✅ Build succeeded!');\n return;\n }\n throw new Error(`Build failed: ${run.conclusion}`);\n }\n } else {\n console.log('⏳ Build workflow not yet started...');\n }\n\n await new Promise(r => setTimeout(r, pollInterval * 1000));\n waited += pollInterval;\n }\n throw new Error('Timed out waiting for build');\n\n # ── 下载构建产物(同 commit 的构建结果) ──\n - name: Download installer\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: installer\n path: assets/\n\n - name: Download playerbuild\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: playerbuild\n path: assets/playerbuild/\n\n # ── 打包 playerbuild 为单个 zip ──\n - name: Zip playerbuild\n run: |\n if [ -d \"assets/playerbuild\" ] && [ \"$(ls -A assets/playerbuild)\" ]; then\n cd assets/playerbuild && zip -r ../OmniMixPlayer_portable.zip . && cd ../..\n echo \"✅ playerbuild zipped\"\n else\n echo \"⏭️ playerbuild empty, skipping\"\n fi\n\n # ── 附加产物到 Release(只上传 installer exe + playerbuild zip)──\n - name: Upload assets to Release\n uses: softprops/action-gh-release@v2\n with:\n tag_name: ${{ needs.release.outputs.tag_name }}\n files: |\n assets/*.exe\n assets/*.zip\n"}, "4800dd2ac005c3c70e1bf1bc732e00f00556ec48": {"t": 1785762591.5280678, "n": 4588, "h": "48857349affacd69", "c": "name: AI Release\n\n# 并发控制:同一分支只保留最新\nconcurrency:\n group: release-${{ github.ref }}\n cancel-in-progress: true\n\non:\n push:\n branches: [main, master]\n workflow_dispatch:\n inputs:\n version_type:\n description: \"版本类型\"\n required: true\n type: choice\n default: \"patch\"\n options:\n - patch\n - minor\n - major\n\npermissions:\n contents: write\n actions: read\n\njobs:\n # ═══════════════════════════════════════════\n # 创建 Release(AI 生成 changelog + tag)\n # ═══════════════════════════════════════════\n release:\n runs-on: ubuntu-latest\n outputs:\n tag_name: ${{ steps.get-tag.outputs.tag }}\n created: ${{ steps.get-tag.outputs.created }}\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n # 记录 release-helper 运行前的 tag\n - name: Capture previous tag\n id: prev-tag\n run: |\n git fetch --tags\n PREV=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"prev=$PREV\" >> $GITHUB_OUTPUT\n echo \"📌 Previous tag: $PREV\"\n\n - name: AI Release\n uses: zxcloli666/release-helper@main\n with:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n OPENAI_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}\n OPENAI_API_BASE_URL: \"https://api.deepseek.com/chat/completions\"\n OPENAI_API_MODEL: \"deepseek-v4-flash\"\n LANGUAGE: \"zh\"\n VERSION_TYPE: ${{ github.event.inputs.version_type }}\n\n # 对比前后 tag,判断是否真的创建了新 release\n - name: Get release tag\n id: get-tag\n run: |\n git fetch --tags\n TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo \"none\")\n echo \"tag=$TAG\" >> $GITHUB_OUTPUT\n if [ \"$TAG\" != \"none\" ] && [ \"$TAG\" != \"${{ steps.prev-tag.outputs.prev }}\" ]; then\n echo \"created=true\" >> $GITHUB_OUTPUT\n echo \"✅ New release created: $TAG\"\n else\n echo \"created=false\" >> $GITHUB_OUTPUT\n echo \"⏭️ No new release (commit 不含 !release: 标记)\"\n fi\n\n # ═══════════════════════════════════════════\n # 等待构建 → 下载产物 → 附加到 Release\n # ═══════════════════════════════════════════\n attach-assets:\n needs: release\n if: needs.release.outputs.created == 'true'\n runs-on: ubuntu-latest\n timeout-minutes: 120 # 等构建最多 2 小时\n steps:\n # ── 等待 Build 工作流完成(仅 push 触发时需要) ──\n # push: 等待同一次 commit 的构建完成\n # workflow_dispatch: 跳过等待,直接拿最新的成功构建产物\n - name: Wait for Build workflow\n if: github.event_name == 'push'\n uses: actions/github-script@v7\n with:\n script: |\n const maxWait = 110 * 60;\n const pollInterval = 30;\n let waited = 0;\n\n while (waited < maxWait) {\n const { data: runs } = await github.rest.actions.listWorkflowRuns({\n owner: context.repo.owner,\n repo: context.repo.repo,\n workflow_id: 'build.yml',\n head_sha: context.sha,\n per_page: 1,\n });\n\n if (runs.workflow_runs.length > 0) {\n const run = runs.workflow_runs[0];\n console.log(`Build status: ${run.status} / ${run.conclusion}`);\n if (run.status === 'completed') {\n if (run.conclusion === 'success') {\n console.log('✅ Build succeeded!');\n return;\n }\n throw new Error(`Build failed: ${run.conclusion}`);\n }\n } else {\n console.log('⏳ Build workflow not yet started...');\n }\n\n await new Promise(r => setTimeout(r, pollInterval * 1000));\n waited += pollInterval;\n }\n throw new Error('Timed out waiting for build');\n\n # ── 下载构建产物(同 commit 的构建结果) ──\n - name: Download installer\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: installer\n path: assets/\n\n - name: Download playerbuild\n uses: dawidd6/action-download-artifact@v6\n with:\n workflow: build.yml\n workflow_conclusion: success\n name: playerbuild\n path: assets/playerbuild/\n\n # ── 附加产物到 Release ──\n - name: Upload assets to Release\n uses: softprops/action-gh-release@v2\n with:\n tag_name: ${{ needs.release.outputs.tag_name }}\n files: |\n assets/**/*\n"}}}} |