Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Pull-request checks for the Prompt Evaluation Simulator.
# Runs the Vitest unit suite and confirms the frontend bundle builds.

name: PR

on:
pull_request:

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Populate design system submodule
run: git submodule update --init

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Unit tests
run: npm test

- name: Build frontend bundle
run: npm run build
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Attach a deployable tarball to a GitHub release.
# The archive includes node_modules, the design-system submodule, and the
# built client (public/app.bundle.js) so a new environment can unpack,
# add a local .env, and start with `node server.js`.

name: Build and Release

on:
release:
types: [created]

permissions:
contents: write

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Populate design system submodule
run: git submodule update --init

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build frontend bundle
run: npm run build

- name: Archive release package
run: |
tar -czf /tmp/dist.tar.gz \
--exclude='.git' \
--exclude='.github' \
--exclude='.env' \
--exclude='session.config.json' \
--exclude='eval-session.json' \
--exclude='chat-sessions.json' \
--exclude='chat-config.json' \
--exclude='public/app.js' \
.
mv /tmp/dist.tar.gz dist.tar.gz

- name: Upload build artifact (for workflow logs)
uses: actions/upload-artifact@v7
with:
name: dist
path: dist.tar.gz

- name: Upload asset to existing release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
artifacts: dist.tar.gz
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true