Skip to content

Merge pull request #4 from axhxrx/temp-branch #26

Merge pull request #4 from axhxrx/temp-branch

Merge pull request #4 from axhxrx/temp-branch #26

Workflow file for this run

name: CI + Publish (if needed)
on:
push:
branches: ['*']
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Test (Bun) and check (Bun)
run: bun test && bun check
- name: Install dependencies for Deno
run: deno install
- name: Check (Deno)
run: deno check
# The --allow-dirty is needed because in CI the deno.lock file may be modified
# NOTE: For now, using --allow-slow-types because the inferred, as const return types of run() are so cool we want to keep investigating
- name: JSR check
run: deno publish --dry-run --allow-dirty --allow-slow-types
# Only run if we're on main and the test job succeeded:
publish:
needs: [test]
runs-on: ubuntu-latest
if: ${{ success() && startsWith(github.ref, 'refs/heads/main') }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: deno install
- name: 'Publish package (if new version exists)'
run: npx jsr publish --allow-dirty --allow-slow-types