Skip to content

Create new release and publish NPM package #8

Create new release and publish NPM package

Create new release and publish NPM package #8

Workflow file for this run

name: Create new release and publish NPM package
on:
workflow_dispatch:
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# pulls all commits, needed for proper changelog generation
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup
- name: Setup NPM config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Git user
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
- name: Run release
run: yarn release --ci --no-increment
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}