mirror of
https://github.com/vector-im/element-call.git
synced 2026-01-18 02:32:27 +00:00
* Embedded package build of Element Call Part of https://github.com/element-hq/element-call/issues/2994 This creates a new "embedded" build (vs "full" build) at the vite level. It will be used by a later PR that actually provides platform specific packages. Embedded build: - Uses relative URLs - Uses relative config.json path and other resource loading - Has a config.json built in - Doesn't include the public folder (e.g. favicon) Out of scope: - this doesn't attempt to exclude SPA functionality, so technically the build could be used in SPA - the above means that the crypto-wasm binary is included in the build * CI artifact name based on type of build * Update src/config/Config.ts
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
name: Build Element Call
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
vite_app_version:
|
|
required: true
|
|
type: string
|
|
package:
|
|
type: string # This would ideally be a `choice` type, but that isn't supported yet
|
|
description: The package type to be built. Must be one of 'full' or 'embedded'
|
|
required: true
|
|
secrets:
|
|
SENTRY_ORG:
|
|
required: true
|
|
SENTRY_PROJECT:
|
|
required: true
|
|
SENTRY_URL:
|
|
required: true
|
|
SENTRY_AUTH_TOKEN:
|
|
required: true
|
|
CODECOV_TOKEN:
|
|
required: false
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Element Call
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
- name: Yarn cache
|
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
|
with:
|
|
cache: "yarn"
|
|
node-version-file: ".node-version"
|
|
- name: Install dependencies
|
|
run: "yarn install --frozen-lockfile"
|
|
- name: Build full version
|
|
if: ${{ inputs.package == 'full' }}
|
|
run: "yarn run build:full"
|
|
env:
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
VITE_APP_VERSION: ${{ inputs.vite_app_version }}
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
- name: Build embedded
|
|
if: ${{ inputs.package == 'embedded' }}
|
|
run: "yarn run build:embedded"
|
|
env:
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
VITE_APP_VERSION: ${{ inputs.vite_app_version }}
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
|
|
with:
|
|
name: build-output-${{ inputs.package }}
|
|
path: dist
|
|
# We'll only use this in a triggered job, then we're done with it
|
|
retention-days: 1
|