Merge pull request #55 from RobQuincey-DC/feature-layer-keywords #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |