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
54 changes: 54 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CodeQL Advanced

on:
push:
branches: ['main', 'development']
pull_request:
branches: ['main', 'development']
schedule:
- cron: '23 1 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs-on uses a template expression that checks for swift, but the matrix only includes actions and javascript-typescript, so the conditional is dead code. Consider simplifying to ubuntu-latest to reduce noise and avoid confusion when maintaining the workflow.

Suggested change
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:${{ matrix.language }}'
68 changes: 68 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Publish to npm

on:
release:
types: [created]
push:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.7'
- run: bun install --frozen-lockfile
- run: bun run lint:types
- run: bun test
- run: bun run build

build-docs:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
Comment on lines +25 to +29
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build-docs and deploy-pages run independently of the main build job, so docs can be deployed even if typecheck/tests/build fail. Consider making build-docs depend on build (or re-running the same verification steps in build-docs) so Pages only deploys from a verified commit.

Copilot uses AI. Check for mistakes.
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.7'
- run: bun install --frozen-lockfile
- run: bun run build:docs
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VitePress is currently configured with base: '/' (see docs/.vitepress/config.ts), but GitHub Pages for a project repo is typically served under /<repo>/. As-is, the deployed docs are likely to have broken asset and link paths. Consider updating the docs base (or making it conditional for CI) to match the Pages subpath used by this repo.

Suggested change
- run: bun run build:docs
- run: bun run build:docs
env:
DOCS_BASE: "/${{ github.event.repository.name }}/"

Copilot uses AI. Check for mistakes.
- uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

publish-npm:
if: github.event_name == 'release'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.7'
- run: bun install --frozen-lockfile
- run: bun run build
- name: Publish to npm (Trusted Publisher)
run: npm publish --access public --provenance

deploy-pages:
needs: build-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test

permissions:
contents: read

on:
push:
branches:
- '**'
pull_request:
branches:
- main
- development
Comment on lines +6 to +13
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow description says CI should trigger on the main development branches, but push.branches: ['**'] will run on every branch. Consider restricting push to main/development (or removing the branches filter entirely if you truly want all branches) to match the intended behavior and reduce unnecessary CI runs.

Copilot uses AI. Check for mistakes.

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read

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

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.7'

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Type-check
run: bun run lint:types

- name: Run tests
run: bun test

- name: Build package
run: bun run build
Loading