跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

release.yml

155 行 · 5.4 KB历史下载
1name: Publish Cage after an explicit release request
2on:
3 workflow_dispatch:
4 inputs:
5 bump:
6 description: Version increment (prerelease continues the alpha/beta sequence)
7 required: true
8 default: prerelease
9 type: choice
10 options: [prerelease, patch, minor, major]
11 version:
12 description: Exact requested version (for example 0.1.7-rc.1); overrides bump
13 required: false
14 type: string
15 notes_path:
16 description: Committed Markdown release notes under docs/ (optional)
17 required: false
18 type: string
19permissions:
20 contents: read
21concurrency:
22 group: cage-explicit-release
23 cancel-in-progress: false
24jobs:
25 readiness:
26 if: github.repository == 'Lee-xeo/Claude-Cage' && github.ref == 'refs/heads/main'
27 runs-on: ubuntu-24.04
28 timeout-minutes: 10
29 environment: cage-release
30 steps:
31 - uses: actions/checkout@v4
32 with:
33 ref: ${{ github.sha }}
34 persist-credentials: false
35 - uses: actions/setup-node@v4
36 with:
37 node-version: 24
38 - uses: actions/setup-java@v4
39 with:
40 distribution: temurin
41 java-version: '21'
42 - name: Check release configuration before creating a candidate
43 env:
44 CAGE_MACOS_P12_BASE64: ${{ secrets.CAGE_MACOS_P12_BASE64 }}
45 CAGE_MACOS_P12_PASSWORD: ${{ secrets.CAGE_MACOS_P12_PASSWORD }}
46 CAGE_MACOS_SIGNING_IDENTITY: ${{ secrets.CAGE_MACOS_SIGNING_IDENTITY }}
47 CAGE_MACOS_NOTARY_KEY_BASE64: ${{ secrets.CAGE_MACOS_NOTARY_KEY_BASE64 }}
48 CAGE_MACOS_NOTARY_KEY_ID: ${{ secrets.CAGE_MACOS_NOTARY_KEY_ID }}
49 CAGE_MACOS_NOTARY_ISSUER_ID: ${{ secrets.CAGE_MACOS_NOTARY_ISSUER_ID }}
50 CAGE_WINDOWS_SIGNING_PROVIDER: ${{ vars.CAGE_WINDOWS_SIGNING_PROVIDER }}
51 CAGE_ESIGNER_USERNAME: ${{ secrets.CAGE_ESIGNER_USERNAME }}
52 CAGE_ESIGNER_PASSWORD: ${{ secrets.CAGE_ESIGNER_PASSWORD }}
53 CAGE_ESIGNER_CREDENTIAL_ID: ${{ secrets.CAGE_ESIGNER_CREDENTIAL_ID }}
54 CAGE_ESIGNER_CERTIFICATE_SERIAL: ${{ vars.CAGE_ESIGNER_CERTIFICATE_SERIAL }}
55 CAGE_ESIGNER_TOTP_SECRET: ${{ secrets.CAGE_ESIGNER_TOTP_SECRET }}
56 CAGE_WINDOWS_PFX_BASE64: ${{ secrets.CAGE_WINDOWS_PFX_BASE64 }}
57 CAGE_WINDOWS_PFX_PASSWORD: ${{ secrets.CAGE_WINDOWS_PFX_PASSWORD }}
58 run: node scripts/check-release-readiness.mjs
59 - name: Validate versions and release behavior
60 run: |
61 node scripts/check-version.mjs
62 node --test scripts/release-version.test.mjs scripts/release-control.test.mjs scripts/prepare-release-assets.test.mjs scripts/esigner.test.mjs
63 prepare:
64 needs: readiness
65 runs-on: ubuntu-24.04
66 timeout-minutes: 10
67 permissions:
68 contents: write
69 outputs:
70 version: ${{ steps.candidate.outputs.version }}
71 commit_sha: ${{ steps.candidate.outputs.commit_sha }}
72 source_sha: ${{ steps.candidate.outputs.source_sha }}
73 steps:
74 - uses: actions/checkout@v4
75 with:
76 ref: ${{ github.sha }}
77 persist-credentials: false
78 - uses: actions/setup-node@v4
79 with:
80 node-version: 24
81 - name: Prepare or reuse this run's version-only candidate
82 id: candidate
83 env:
84 GH_TOKEN: ${{ github.token }}
85 run: node scripts/release-control.mjs prepare
86 macos:
87 needs: prepare
88 uses: ./.github/workflows/macos-build.yml
89 secrets: inherit
90 with:
91 ref: ${{ needs.prepare.outputs.commit_sha }}
92 release: true
93 artifact_name: release-macos
94 windows:
95 needs: prepare
96 uses: ./.github/workflows/windows-build.yml
97 secrets: inherit
98 with:
99 ref: ${{ needs.prepare.outputs.commit_sha }}
100 release: true
101 artifact_name: release-windows
102 linux:
103 needs: prepare
104 uses: ./.github/workflows/linux-build.yml
105 with:
106 ref: ${{ needs.prepare.outputs.commit_sha }}
107 release: true
108 artifact_name: release-linux
109 publish:
110 needs: [prepare, macos, windows, linux]
111 runs-on: ubuntu-24.04
112 timeout-minutes: 45
113 permissions:
114 contents: write
115 outputs:
116 tag: ${{ steps.release.outputs.tag }}
117 url: ${{ steps.release.outputs.url }}
118 steps:
119 - uses: actions/checkout@v4
120 with:
121 ref: ${{ needs.prepare.outputs.commit_sha }}
122 fetch-depth: 0
123 persist-credentials: false
124 - uses: actions/setup-node@v4
125 with:
126 node-version: 24
127 - uses: actions/download-artifact@v4
128 with:
129 name: release-macos
130 path: _output/release-artifacts/macos
131 - uses: actions/download-artifact@v4
132 with:
133 name: release-windows
134 path: _output/release-artifacts/windows
135 - uses: actions/download-artifact@v4
136 with:
137 name: release-linux
138 path: _output/release-artifacts/linux
139 - name: Verify all platforms, promote atomically, then publish complete assets
140 id: release
141 env:
142 GH_TOKEN: ${{ github.token }}
143 RELEASE_SOURCE_SHA: ${{ needs.prepare.outputs.source_sha }}
144 RELEASE_COMMIT_SHA: ${{ needs.prepare.outputs.commit_sha }}
145 RELEASE_VERSION: ${{ needs.prepare.outputs.version }}
146 run: node scripts/release-control.mjs publish
147 website:
148 needs: publish
149 permissions:
150 contents: read
151 pages: write
152 id-token: write
153 uses: ./.github/workflows/www.yml
154 with:
155 release_tag: ${{ needs.publish.outputs.tag }}