Skip to content

fix: errors

fix: errors #19

Workflow file for this run

name: npm
on:
push:
tags:
- 'v*'
jobs:
build:
name: ubuntu-latest
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Setup Environment
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Clone repository
uses: actions/checkout@v2
- name: Install Deno
uses: denolib/setup-deno@master
with:
deno-version: 1.x.x
- name: Log versions
run: |
deno --version
# Lint & Format
- name: Lint & Format TS
run: |
deno lint
# Start nats
- name: Create Nats cluster
uses: onichandame/nats-action@master
with:
port: '4222' # multiple different ports will start a cluster. single port will start a single server
# Tests
- name: Test
run: deno test -A
# Build
- name: Build for npm
run: deno run -A build_npm.ts ${GITHUB_REF/refs\/tags\/v/}
# Prepare npm for publish
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
# Publish
- name: npm publish
shell: bash
# excludes tests, testdata, and generated sources from coverage report
run: |
cd npm
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}