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
20 changes: 0 additions & 20 deletions .github/workflows/browser.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Builds and tests the package. Successful runs on `main` trigger `publish.yml`.

name: CI

on:
push:
branches: [ dev, main ]
pull_request:
branches: [ dev ]

permissions:
contents: read

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 24.x, 26.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run typecheck

browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm install && cd example/browser && npm install
- run: docker run --name seq -d -p 5341:80 -e ACCEPT_EULA=Y -e SEQ_FIRSTRUN_NOAUTHENTICATION=true datalust/seq:latest
- run: cd example/browser && npm run test:html
- run: docker rm -f seq
32 changes: 0 additions & 32 deletions .github/workflows/node.js.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/npm-publish.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Publishes the package to npm using trusted publishing (OIDC) after a successful CI run on `main`
# For more information see: https://docs.npmjs.com/trusted-publishers

name: Publish

on:
workflow_run:
workflows: [ CI ]
types: [ completed ]
branches: [ main ]

permissions:
contents: read

jobs:
publish-npm:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_repository.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for npm trusted publishing
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: https://registry.npmjs.org/
- run: npm install -g npm@latest
- run: npm publish
Loading