52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: Build
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ master ]
|
|
workflow_call:
|
|
inputs:
|
|
SENTRY_ORG:
|
|
required: true
|
|
type: string
|
|
SENTRY_PROJECT:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
SENTRY_AUTH_TOKEN:
|
|
required: true
|
|
SENTRY_DSN:
|
|
required: true
|
|
SENTRY_URL:
|
|
required: true
|
|
jobs:
|
|
build:
|
|
name: "Build"
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# This must be set for fetchdep.sh to get the right branch
|
|
PR_NUMBER: ${{github.event.number}}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: 'yarn'
|
|
|
|
- name: Install Dependencies
|
|
run: "./scripts/layered.sh"
|
|
|
|
- name: Build & Package
|
|
run: "./scripts/ci_package.sh"
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
|
SENTRY_ORG: ${{ inputs.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ inputs.SENTRY_PROJECT }}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: previewbuild
|
|
path: dist/*.tar.gz
|
|
retention-days: ${{ github.ref == 'develop' && 1 || 28 }}
|