Merge pull request #8 from vendrinc/robert/node-20-compatibility #17
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: NPM Publish | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Use Node.js ${{ steps.nvm.outputs.NVMRC }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install Node Deps | |
run: npm ci | |
- name: "Publish if Changed" | |
id: publish | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Version Updated | |
if: steps.publish.outputs.type != 'none' | |
run: | | |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" |