| 1 | name: Add verified Windows and Linux packages to a version release |
| 2 | on: |
| 3 | workflow_dispatch: |
| 4 | inputs: |
| 5 | run_id: |
| 6 | description: Successful three-platform CI run containing the installers |
| 7 | required: true |
| 8 | type: string |
| 9 | unsigned_windows: |
| 10 | description: Explicitly publish the Windows installer as an unsigned preview |
| 11 | required: true |
| 12 | default: false |
| 13 | type: boolean |
| 14 | permissions: |
| 15 | contents: read |
| 16 | concurrency: |
| 17 | group: cage-platform-preview |
| 18 | cancel-in-progress: false |
| 19 | jobs: |
| 20 | publish: |
| 21 | if: github.repository == 'Lee-xeo/Claude-Cage' && github.ref == 'refs/heads/main' && inputs.unsigned_windows |
| 22 | runs-on: ubuntu-24.04 |
| 23 | timeout-minutes: 30 |
| 24 | permissions: |
| 25 | contents: write |
| 26 | actions: read |
| 27 | outputs: |
| 28 | tag: ${{ steps.publish.outputs.tag }} |
| 29 | steps: |
| 30 | - uses: actions/checkout@v4 |
| 31 | with: |
| 32 | persist-credentials: false |
| 33 | - uses: actions/setup-node@v4 |
| 34 | with: |
| 35 | node-version: 24 |
| 36 | - run: node --test scripts/publish-platform-preview.test.mjs |
| 37 | - uses: actions/download-artifact@v4 |
| 38 | with: |
| 39 | github-token: ${{ github.token }} |
| 40 | run-id: ${{ inputs.run_id }} |
| 41 | name: cage-windows-amd64-test-windows-2025 |
| 42 | path: _output/platform-publication/windows |
| 43 | - uses: actions/download-artifact@v4 |
| 44 | with: |
| 45 | github-token: ${{ github.token }} |
| 46 | run-id: ${{ inputs.run_id }} |
| 47 | name: cage-linux-amd64-test |
| 48 | path: _output/platform-publication/linux |
| 49 | - name: Verify and add platform packages to the existing version release |
| 50 | id: publish |
| 51 | env: |
| 52 | GH_TOKEN: ${{ github.token }} |
| 53 | CAGE_PREVIEW_RUN: ${{ inputs.run_id }} |
| 54 | run: node scripts/publish-platform-preview.mjs |
| 55 | website: |
| 56 | needs: publish |
| 57 | permissions: |
| 58 | contents: read |
| 59 | pages: write |
| 60 | id-token: write |
| 61 | uses: ./.github/workflows/www.yml |
| 62 | with: |
| 63 | release_tag: ${{ needs.publish.outputs.tag }} |