Skip to content

Merge pull request #55 from RobQuincey-DC/feature-layer-keywords #10

Merge pull request #55 from RobQuincey-DC/feature-layer-keywords

Merge pull request #55 from RobQuincey-DC/feature-layer-keywords #10

Workflow file for this run

name: Publish NPM package @dev version
# This workflow runs whenever a commit is pushed on main
on:
push:
branches:
- main
jobs:
publish-npm-package:
name: Publish NPM package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & NPM
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
# New version will be <npm version>.<commit hash>, e.g. 1.1.1-dev.0a4c598
- name: Adjust package version according to branch & commit
run: npm version $(node --print 'require("./package.json").version').$(git rev-parse --short HEAD) --no-git-tag-version --allow-same-version
- name: Publish NPM package with @dev tag
run: npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}