Add support for NPM #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Format | |
run: deno fmt --check | |
- name: Lint | |
run: deno lint | |
- name: Type-check | |
run: deno check --frozen **/*.ts | |
- name: Run tests | |
run: deno test --permit-no-files | |
- name: Generate jsr.json | |
run: deno run --allow-read=. --allow-run=deno scripts/generate-package-manifest.ts --type=jsr | tee jsr.json | |
- name: Dry run publish to JSR | |
run: deno publish --config=jsr.json --dry-run | |
- name: Generate package.json | |
run: deno run --allow-read=. --allow-run=deno scripts/generate-package-manifest.ts --type=npm | tee package.json | |
- name: Install dependencies | |
run: deno install | |
- name: Build | |
run: deno task --eval "tsc -b" | |
- name: Dry run publish to NPM | |
run: npm publish --dry-run |