Skip to content

feat: publish to JSR (#117) #271

feat: publish to JSR (#117)

feat: publish to JSR (#117) #271

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test-${{ matrix.os }}-${{ matrix.deno }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Test on the latest stable, and canary
deno: [v1.x, canary]
os: [macOS-latest, windows-latest, ubuntu-latest]
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@main
with:
# TODO: revert back to actually using latest stable once https://github.com/denoland/deno/issues/22926 is released
deno-version: ${{ matrix.deno == 'v1.x' && 'v1.40.3' || matrix.deno}}
- run: deno --version
- name: Format
if: runner.os == 'Linux'
run: deno fmt --check
- name: Lint
if: runner.os == 'Linux'
run: deno lint
- name: Doc lint
if: runner.os == 'Linux'
run: deno doc --lint mod.ts
- name: Run tests
run: deno test -A
- name: Dry run publishing
if: runner.os == 'Linux' && matrix.deno == 'canary'
run: deno publish --dry-run
- name: Publish (on tag)
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.deno == 'canary'
run: deno publish