2024-04-13 04:36:34 +08:00
|
|
|
name: Element Call - Build
|
|
|
|
on:
|
|
|
|
workflow_call:
|
2024-04-15 16:26:06 +08:00
|
|
|
inputs:
|
|
|
|
vite_app_version:
|
|
|
|
required: true
|
|
|
|
type: string
|
2024-04-13 04:36:34 +08:00
|
|
|
secrets:
|
|
|
|
SENTRY_ORG:
|
|
|
|
required: true
|
|
|
|
SENTRY_PROJECT:
|
|
|
|
required: true
|
|
|
|
SENTRY_URL:
|
|
|
|
required: true
|
|
|
|
SENTRY_AUTH_TOKEN:
|
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build Element Call
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-10-09 18:02:22 +08:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
|
2024-04-13 04:36:34 +08:00
|
|
|
- name: Yarn cache
|
2024-09-28 05:30:48 +08:00
|
|
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
|
2024-04-13 04:36:34 +08:00
|
|
|
with:
|
|
|
|
cache: "yarn"
|
2024-07-24 23:12:36 +08:00
|
|
|
node-version: "lts/*"
|
2024-04-13 04:36:34 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: "yarn install"
|
|
|
|
- name: Build
|
|
|
|
run: "yarn run build"
|
|
|
|
env:
|
|
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
|
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
2024-04-15 16:26:06 +08:00
|
|
|
VITE_APP_VERSION: ${{ inputs.vite_app_version }}
|
2024-04-13 04:36:34 +08:00
|
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
|
|
- name: Upload Artifact
|
2024-10-14 21:47:02 +08:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
|
2024-04-13 04:36:34 +08:00
|
|
|
with:
|
|
|
|
name: build-output
|
|
|
|
path: dist
|
|
|
|
# We'll only use this in a triggered job, then we're done with it
|
|
|
|
retention-days: 1
|