mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
* refactor(tooling): organize test runtime and maintenance owners * test(tooling): preserve relocated runtime fixture dependency edges * refactor(tooling): preserve xterm routing owner checks * ci(tooling): include routing owner in sparse checkout * test(tooling): preserve copied workflow dependency closures * fix(tooling): normalize hashed JSON assets in release parity * fix(tooling): distinguish asset aliases from literal references * fix(tooling): frame normalized asset reference payloads * fix(tooling): normalize decoded JSON asset references * refactor(tooling): organize build, CI and release owners * fix(tooling): align moved generator and workflow path contracts * fix(tooling): update generated plugin bundle owner banners * test(tooling): create relocated mobile verifier fixture directories * test(tooling): copy headless detector dependency closure * test(tooling): align native batch policy fixtures with owner path * fix(tooling): link moved reliability command to historical evidence * fix(tooling): preserve nested sandbox owners and canonical guide source * fix(tooling): target release version owners in checkout fixture
113 lines
4.3 KiB
YAML
113 lines
4.3 KiB
YAML
name: Release JavaScript bundle
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
required: true
|
|
type: string
|
|
dev_build:
|
|
description: Build without official-channel telemetry constants
|
|
type: boolean
|
|
default: false
|
|
runner:
|
|
type: string
|
|
default: blacksmith-8vcpu-ubuntu-2404
|
|
outputs:
|
|
supported:
|
|
value: ${{ jobs.bundle.outputs.supported }}
|
|
source_sha:
|
|
value: ${{ jobs.bundle.outputs.source_sha }}
|
|
secrets:
|
|
ORCA_POSTHOG_WRITE_KEY:
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
ORCA_BACKGROUND_LAUNCH: '1'
|
|
|
|
jobs:
|
|
bundle:
|
|
runs-on: ${{ inputs.runner }}
|
|
timeout-minutes: 20
|
|
outputs:
|
|
supported: ${{ steps.source.outputs.supported }}
|
|
source_sha: ${{ steps.source.outputs.sha }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
persist-credentials: false
|
|
|
|
# Older release refs retain their original per-platform build commands.
|
|
- name: Resolve bundle source and support
|
|
id: source
|
|
shell: bash
|
|
run: |
|
|
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
|
node <<'NODE' >> "$GITHUB_OUTPUT"
|
|
const fs = require('node:fs')
|
|
const { scripts, devDependencies } = require('./package.json')
|
|
const artifactScript = fs.existsSync('config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs')
|
|
? 'config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs'
|
|
: 'config/scripts/release-javascript-artifact.mjs'
|
|
const supported = Boolean(scripts['build:release:javascript'] && scripts['build:release:host'])
|
|
const devSupported = supported && Boolean(
|
|
scripts['build:release:javascript:parallel'] && devDependencies?.tsrs &&
|
|
fs.readFileSync(artifactScript, 'utf8')
|
|
.includes('ORCA_RELEASE_JAVASCRIPT_BUILD_IDENTITY')
|
|
)
|
|
console.log('supported=' + (process.env.DEV_BUILD === 'true' ? devSupported : supported))
|
|
NODE
|
|
env:
|
|
DEV_BUILD: ${{ inputs.dev_build }}
|
|
|
|
- uses: ./.github/actions/install-node-dependencies
|
|
if: steps.source.outputs.supported == 'true'
|
|
with:
|
|
native-runtime: node
|
|
|
|
- uses: ./.github/actions/install-mobile-dependencies
|
|
if: steps.source.outputs.supported == 'true'
|
|
|
|
- name: Resolve release build identity
|
|
id: identity
|
|
if: steps.source.outputs.supported == 'true' && !inputs.dev_build
|
|
run: |
|
|
RELEASE_TAG="v$(node -p 'require("./package.json").version')"
|
|
export RELEASE_TAG
|
|
RELEASE_JAVASCRIPT_ARTIFACT='config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs'
|
|
if [ ! -f "$RELEASE_JAVASCRIPT_ARTIFACT" ]; then
|
|
RELEASE_JAVASCRIPT_ARTIFACT='config/scripts/release-javascript-artifact.mjs'
|
|
fi
|
|
echo "value=$(node "$RELEASE_JAVASCRIPT_ARTIFACT" identity)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build and archive release JavaScript
|
|
if: steps.source.outputs.supported == 'true'
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
|
JAVASCRIPT_BUILD_SCRIPT: ${{ inputs.dev_build && 'build:release:javascript:parallel' || 'build:release:javascript' }}
|
|
ORCA_CLI_BUILD_COMPILER: ${{ inputs.dev_build && 'tsrs' || 'bun' }}
|
|
ORCA_BUILD_IDENTITY: ${{ steps.identity.outputs.value }}
|
|
ORCA_RELEASE_JAVASCRIPT_BUILD_IDENTITY: ${{ inputs.dev_build && 'dev' || '' }}
|
|
ORCA_DIAGNOSTICS_TOKEN_URL: https://www.onorca.dev/diagnostics/token
|
|
ORCA_POSTHOG_WRITE_KEY: ${{ !inputs.dev_build && secrets.ORCA_POSTHOG_WRITE_KEY || '' }}
|
|
run: |
|
|
pnpm run "$JAVASCRIPT_BUILD_SCRIPT"
|
|
RELEASE_JAVASCRIPT_ARTIFACT='config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs'
|
|
if [ ! -f "$RELEASE_JAVASCRIPT_ARTIFACT" ]; then
|
|
RELEASE_JAVASCRIPT_ARTIFACT='config/scripts/release-javascript-artifact.mjs'
|
|
fi
|
|
node "$RELEASE_JAVASCRIPT_ARTIFACT" pack
|
|
|
|
- uses: actions/upload-artifact@v7
|
|
if: steps.source.outputs.supported == 'true'
|
|
with:
|
|
name: release-javascript
|
|
path: .build/release-javascript/
|
|
compression-level: 0
|
|
retention-days: 7
|
|
if-no-files-found: error
|