Skip to content

Publish to NPM

Publish to NPM #12

Workflow file for this run

name: Publish to NPM
on:
workflow_dispatch:
push:
tags:
- 'v*' # This will run the workflow when you push a tag with a version format, like v1.0.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Deno
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh
echo "DENO_INSTALL=/home/runner/.deno" >> $GITHUB_ENV
echo "$DENO_INSTALL/bin" >> $GITHUB_PATH
- name: Run Deno build script
run: deno run -A build.ts
- name: Navigate to npm directory
run: cd ./npm
- name: Setup .npmrc file to publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
- name: Publish to NPM
run: npm publish --dry-run
working-directory: ./npm