Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1.1.2

- name: NPM install with caching
run: npm install
- name: NPM install
run: npm ci

- name: Build
run: npm run build
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish package to NPM

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust:
- stable

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3.8.1

- name: Setup Deno
uses: denoland/setup-deno@v1.1.2

- name: NPM install
run: npm ci

- name: Build
run: npm run build

- name: Node Test
run: npm run test

- name: Deno Test
run: deno test -A ./tests/mod.test.ts

- name: Update package version
run: |
tag="${{ github.ref }}"
tag="${tag/refs\/tags\/v/}"
npm version $tag --no-git-tag-version --no-commit-hooks

- name: NPM Publish
uses: JS-DevTools/npm-publish@v2.2.2
with:
token: ${{ secrets.NPM_TOKEN }}