ci(companion): add bundle build-verify-upload workflow
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: companion-release-bundle
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platform:
|
||||
description: Companion platform (macos|ios|android)
|
||||
required: true
|
||||
default: macos
|
||||
node_id:
|
||||
description: Node ID for release bundle manifest
|
||||
required: true
|
||||
default: companion-release-node
|
||||
gateway_url:
|
||||
description: Gateway URL embedded in bundle
|
||||
required: true
|
||||
default: ws://127.0.0.1:18800
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate ephemeral signing key
|
||||
run: |
|
||||
mkdir -p .ci/keys
|
||||
openssl genpkey -algorithm RSA -out .ci/keys/release-private.pem -pkeyopt rsa_keygen_bits:2048
|
||||
|
||||
- name: Build and verify companion release bundle
|
||||
run: |
|
||||
pnpm companion:bundle -- \
|
||||
--output artifacts/companion-${{ inputs.platform }} \
|
||||
--platform ${{ inputs.platform }} \
|
||||
--node-id ${{ inputs.node_id }} \
|
||||
--url ${{ inputs.gateway_url }} \
|
||||
--signing-key .ci/keys/release-private.pem \
|
||||
--signing-key-id ci-${{ inputs.platform }}
|
||||
|
||||
- name: Upload bundle artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: companion-${{ inputs.platform }}-bundle
|
||||
path: artifacts/companion-${{ inputs.platform }}
|
||||
Reference in New Issue
Block a user