Publish to JSR #2
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: Publish to JSR | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
inputs: | |
npm_version: | |
description: 'Version number to publish on JSR X.Y.Z' | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Setup repo | |
uses: actions/[email protected] # use nodeJS 20 | |
- name: Setup Deno | |
uses: denoland/[email protected] | |
with: | |
deno-version: v1.43.3 | |
- name: Node setup | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Run linter | |
run: deno lint | |
- name: Run tests | |
run: deno test -A | |
- name: show deno version | |
run: deno --version | |
- name: Publish package ${{inputs.npm_version}} | |
# run: npx jsr publish | |
run: deno publish --dry-run --allow-dirty |