Skip to content

Deploy to npm

Deploy to npm #1164

Workflow file for this run

name: Deploy to npm
on:
schedule:
# Daily run
- cron: "0 4 * * *"
workflow_dispatch: null
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: npm
- run: git pull --tags
- run: npm install
- run: npm run build
- run: npm test
- name: Create packages for .d.ts files
run: node deploy/createTypesPackages.js
- name: "Deploy built packages to NPM"
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm i -g npm@latest
npm whoami
node deploy/deployChangedPackages.js
env:
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}