Skip to content

Commit

Permalink
[FEAT] npm workflow to release nats.ws (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Nov 2, 2023
1 parent a0154cf commit fa8ef46
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: NATS.ws NPM release

on:
release:
types: [created]

jobs:
test:
strategy:
matrix:
node-version: [20.x]
deno-version: [1.36.4]

runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout NATS.ws
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Use Deno Version ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
- run: npm install -g npm
- run: npm ci
- run: npm run prepack
- name: Set tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test tag
run: |
npm run check-package
- run: npm run clean
- run: npm publish --provenance --access public --tag=next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nats.ws",
"version": "1.19.0",
"version": "1.19.1-1",
"description": "WebSocket NATS client",
"main": "./cjs/nats.js",
"module": "./esm/nats.js",
Expand Down
2 changes: 1 addition & 1 deletion src/ws_transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
render,
} from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.18.0/nats-base-client/internal_mod.ts";

const VERSION = "1.19.0";
const VERSION = "1.19.1-1";
const LANG = "nats.ws";

export type WsSocketFactory = (u: string, opts: ConnectionOptions) => Promise<{
Expand Down

0 comments on commit fa8ef46

Please sign in to comment.