Skip to content

Update README.md

Update README.md #10

Workflow file for this run

name: CICD
# Triggers when pushed to master branch
on:
push:
branches:
- master
tags:
- '!*'
jobs:
release:
name: release-npm-package
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-node
uses: actions/setup-node@v2
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
# Install dependencies
- name: install-dependencies
run: npm ci
# Run test
- name: test
run: npm test
# Get current package version
- name: current-package-version
run: node -p -e '`CURRENT_PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
# Create tag with current package version
- name: current-package-version-to-git-tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: ''
version: ${{ env.CURRENT_PACKAGE_VERSION }}
# Publish to npm
- name: publish-to-npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}