Skip to content

npm token

npm token #8

Workflow file for this run

on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- name: can-publish
run: npx can-npm-publish --verbose
- name: current-package-version
run: node -p -e '`CURRENT_PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: release-draft
uses: release-drafter/release-drafter@v5
with:
name: v${{ env.CURRENT_PACKAGE_VERSION }}
tag: v${{ env.CURRENT_PACKAGE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: npm install
run: npm ci
- name: build
run: npm run build
- name: publish-to-npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}