Skip to content

feat: publish to jsr (#122) #8

feat: publish to jsr (#122)

feat: publish to jsr (#122) #8

Workflow file for this run

name: Publish
on: [push, pull_request]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Build
run: deno task build
# temporary until https://github.com/denoland/deno/issues/22656 is fixed
- name: Delete .gitignore
run: rm .gitignore
# add back once https://github.com/denoland/deno/issues/22658 is fixed
# - name: Publish package (Dry run)
# if: ${{ github.ref != 'refs/heads/main' }}
# run: deno publish --dry-run
- name: Publish package
if: ${{ github.ref == 'refs/heads/main' }}
run: deno publish