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

add node to node-sdk pointing to mono-repo #55

add node to node-sdk pointing to mono-repo

add node to node-sdk pointing to mono-repo #55

Workflow file for this run

name: Node SDK - Release
on:
push:
branches:
- main
jobs:
release:
name: Test, build and deploy to npm
if: ${{ !contains(github.event.head_commit.message, 'norelease') }}
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.create_tag.outputs.new_tag }}
steps:
- uses: actions/checkout@main
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install --force
- name: Test
run: npm run test
- name: Generate new tag (dry run)
uses: mathieudutour/[email protected]
id: get_new_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
- name: Update npm package version
run: |
npm --no-git-tag-version version ${{ steps.get_new_version.outputs.new_version }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bumped npm package version to ${{ steps.get_new_version.outputs.new_version }}
- name: Create tag
uses: mathieudutour/[email protected]
id: create_tag
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: npm run build
- name: Release to npm
working-directory: ./build
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}