Skip to content

adding missing npm scripts pkg:org and tag for npm publishing #2

adding missing npm scripts pkg:org and tag for npm publishing

adding missing npm scripts pkg:org and tag for npm publishing #2

# ./.github/workflows/publish_npm_package.yml
# For more information see: https://github.com/marketplace/actions/npm-publish
name: Node.js CI NPM Publish Package
on:
pull_request:
types:
- closed
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
access: "public"
tag: ${{ steps.publish.outputs.version }}
token: ${{ secrets.NPM_GITHUB_OBEWDS_AUTOMATION_AUTH_TOKEN }}
- if: steps.publish.outputs.old-version != steps.publish.outputs.version
run: npm install && npm run pkg:org && npm run tag