Skip to content

Publish on NPM

Publish on NPM #38

Workflow file for this run

name: Publish on NPM
on:
workflow_dispatch:
jobs:
publish-to-npm:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CD_GITHUB_APP_ID }}
private-key: ${{ secrets.CD_GITHUB_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- run: yarn install --immutable
- run: yarn lerna version --no-private --conventional-commits --create-release github --generate-release-notes --y
- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
yarn run publish --y