Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
36 lines
886 B
YAML
36 lines
886 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
# If a commit reaches master, assume it has passed CI via PR and publish
|
|
# without running tests to save time to publish
|
|
branches: [ "master" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
|
with:
|
|
persist-credentials: false
|
|
- name: Use Node.js 22.x
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
|
with:
|
|
node-version: 22.x
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run setup
|
|
- name: Package headless
|
|
run: |
|
|
npm run package-headless
|
|
node ./bin/package_headless.js
|
|
- name: Publish to npm
|
|
env:
|
|
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: node ./bin/publish.js
|