Skip to content

Fix Rollup dependency issue in GitHub Actions workflows #2

Fix Rollup dependency issue in GitHub Actions workflows

Fix Rollup dependency issue in GitHub Actions workflows #2

Workflow file for this run

name: CD
on:
push:
branches: [main]
jobs:
build-test-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Clean install
run: |
rm -rf node_modules package-lock.json
npm install
- name: Build
run: npm run build
- name: Run checks (linting, type-checking, formatting)
run: npm run check
- name: Run tests
run: npm run test
- name: Publish package to npm
if: ${{ vars.ENVIRONMENT == 'prod' }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}