Skip to content

Updated action

Updated action #14

Workflow file for this run

on:
push:
branches:
- "master"
jobs:
Publish_NPM:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
#Install Node.js, with the version 12 and using the registry URL of npm, this could be changed to a custom registry or the GitHub registry.
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org
# Patch version
- run: echo "CURR_VER=$(npm view com.overimagined.singleton version)" >> $GITHUB_ENV
- run: npm --no-git-tag-version version ${{env.CURR_VER}}
- run: npm --no-git-tag-version version patch
# Publish to npm
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}