ci: add build
This commit is contained in:
parent
8851f6867b
commit
5a085a46d4
1 changed files with 60 additions and 0 deletions
60
.github/workflows/build.yml
vendored
Normal file
60
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
with:
|
||||||
|
bun-version: latest
|
||||||
|
|
||||||
|
- name: Restore Bun cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.bun/install/cache
|
||||||
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build development bundle
|
||||||
|
run: bun run build --dev
|
||||||
|
|
||||||
|
- name: Upload development bundle
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: revenge-bundle-development
|
||||||
|
path: dist/revenge.bundle
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Clear build
|
||||||
|
run: rm -rf dist
|
||||||
|
|
||||||
|
- name: Build production bundle
|
||||||
|
run: bun run build
|
||||||
|
|
||||||
|
- name: Upload production bundle
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: revenge-bundle
|
||||||
|
path: dist/revenge.bundle
|
||||||
|
if-no-files-found: error
|
||||||
Loading…
Add table
Reference in a new issue