Skip to content

publish to npm (#3)

publish to npm (#3) #8

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
jsr:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
- name: Publish package
run: deno publish
npm:
needs:
- jsr
runs-on: ubuntu-latest
# if you need publish with provenance, you should set permissions
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org" # needed for npm publish
- uses: denoland/setup-deno@v2
- name: Publish to npm
run: deno run -A jsr:@ryoppippi/mirror-jsr-to-npm
env:
PACKAGE_DESCRIPTION: "Elegant, no-nonsense, typesafe binary data reading and writing."
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Set your npm token as a GitHub secret
NPM_CONFIG_PROVENANCE: true # If you publish with provenance