Skip to content

CI Build

CI Build #415

Workflow file for this run

name: CI/Build
run-name: ${{ contains(fromJSON('["push", "pull_request"]'), github.event_name) && 'CI Build' || (inputs.dev == 'true' && 'Dev Build' || 'Prod Build')}}
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
workflow_call:
inputs:
dev:
type: boolean
description: "Build for dev instance"
required: true
default: false
env:
PACK_SCRIPT: ${{ inputs.dev == 'true' && 'pack:dev' || 'pack'}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: 'npm'
- name: npm install and build
run: |
npm ci
npm run build --if-present
npm run test --if-present
- name: "webpack ${{ env.PACK_SCRIPT }}"
run: npm run ${{ env.PACK_SCRIPT }} --if-present
- name: zip deployment bundle
run: zip -r seabot.zip dist
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: seabot
path: seabot.zip