Create new release and publish NPM package #9
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: 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 }} |