Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

use new gh actions workflows (#5) #1

use new gh actions workflows (#5)

use new gh actions workflows (#5) #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: 'https://registry.npmjs.org/'
- name: Install Node dependencies
run: npm ci
- name: Update version in package.json
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
npm version $TAG_VERSION --no-git-tag-version
- name: Run Node build (if present)
run: npm run build --if-present
- name: Publish NPM package
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}