Skip to content

npm CI

npm CI #221

Workflow file for this run

name: npm CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 0"
jobs:
build-publish-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Cache the dependency directories
uses: actions/cache@v2
with:
path: |
node_modules
key: npm
- name: Install dependencies with npm
run: bun install
working-directory: ts
- name: Run tests with npm
run: bun test
working-directory: ts
- name: Build with bun
run: bun run build
working-directory: ts
- name: Publish to npm
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: JS-DevTools/npm-publish@v3
with:
package: ts/
token: ${{ secrets.NPM_AUTH_TOKEN }}
access: "public"
- name: Publish docs to GitHub pages
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ts/typedoc