Skip to content

fix: use tsup for ESM build to resolve ERR_UNSUPPORTED_DIR_IMPORT #699

fix: use tsup for ESM build to resolve ERR_UNSUPPORTED_DIR_IMPORT

fix: use tsup for ESM build to resolve ERR_UNSUPPORTED_DIR_IMPORT #699

Workflow file for this run

name: main
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [^20, ^22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn lint
- run: yarn test
- run: yarn coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: node-${{ matrix.node-version }}
fail_ci_if_error: false
semantic-release:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run semantic-release
if: github.repository == 'apache/casbin-node-casbin' && github.event_name == 'push'
run: yarn install && yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}