v1.1.6 #13
Workflow file for this run
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
# This workflow will install Deno then run `deno lint` and `deno test`. | |
# For more information see: https://github.com/denoland/setup-deno | |
name: Publish to NPM | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
inputs: | |
npm_version: | |
description: 'Version number to publish on NPM X.Y.Z' | |
required: true | |
permissions: | |
contents: read | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
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: Build Node JS code with dnt | |
run: deno run -A _build_npm.ts ${{inputs.npm_version}} | |
env: | |
PKG_VERSION: ${{inputs.npm_version}} | |
- name: refresh the project | |
run: | | |
npm install -g npm-check-updates | |
cd npm | |
npm-check-updates -u | |
npm install | |
npm run test | |
- name: Publish to npmjs.com | |
run: | | |
cd npm | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |