chore(core): 更新 sing-box eBPF 内核至 bf1a2991 #82
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 持续集成(构建与开发包) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'src/module/**' | |
| - 'src/webui/**' | |
| - '.github/workflows/ci.yml' | |
| - '.github/actions/build-module/**' | |
| permissions: | |
| contents: write | |
| # 同一分支的新推送取消尚未完成的旧构建 | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: 构建与发布开发包 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 拉取代码 | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: 设置构建元信息 | |
| run: | | |
| echo "TIMESTAMP=$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S')" >> "$GITHUB_ENV" | |
| echo "SHORT_HASH=${GITHUB_SHA::7}" >> "$GITHUB_ENV" | |
| echo "COMMIT_MESSAGE=$(git log -1 --format=%s "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
| - name: 构建并打包模块 | |
| id: pack | |
| uses: ./.github/actions/build-module | |
| - name: 发布 Pre-release 到 GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # 删除已有的 nightly 发布和 Tag | |
| gh release delete nightly --cleanup-tag -y || true | |
| # 等待 API 状态同步 | |
| sleep 2 | |
| # 创建新的 nightly 发布并上传资产 | |
| gh release create nightly \ | |
| --prerelease \ | |
| --generate-notes \ | |
| --title "nightly Pre-release" \ | |
| --notes "同步最新代码变更,仅保留最新版本的构建产物。 | |
| 版本: \`${{ steps.pack.outputs.version }}\` (build ${{ steps.pack.outputs.commit_count }}) | |
| 构建时间: ${{ env.TIMESTAMP }} | |
| 提交: \`${{ env.SHORT_HASH }}\`" \ | |
| "${{ steps.pack.outputs.full_name }}" \ | |
| "${{ steps.pack.outputs.lite_name }}" | |
| - name: Telegram 构建成功通知 | |
| if: success() | |
| uses: cbrgm/telegram-github-action@v1 | |
| with: | |
| token: ${{ secrets.TG_BOT_TOKEN }} | |
| to: ${{ secrets.TG_CHAT_ID }} | |
| thread-id: 2275 | |
| parse-mode: markdown | |
| message: | | |
| **持续集成构建成功** | |
| 版本: `${{ steps.pack.outputs.version }}` (build ${{ steps.pack.outputs.commit_count }}) | |
| 说明: ${{ env.COMMIT_MESSAGE }} | |
| [下载开发包](${{ github.server_url }}/${{ github.repository }}/releases/tag/nightly) | |
| [提交记录](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}) | |
| [构建日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
| - name: 失败通知 | |
| if: failure() | |
| uses: cbrgm/telegram-github-action@v1 | |
| with: | |
| token: ${{ secrets.TG_BOT_TOKEN }} | |
| to: ${{ secrets.TG_CHAT_ID }} | |
| thread-id: 2275 | |
| parse-mode: markdown | |
| message: | | |
| **持续集成失败!** | |
| 提交: `${{ github.sha }}` | |
| 说明: ${{ env.COMMIT_MESSAGE }} | |
| [点击查看构建日志](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) |