Skip to content

Publish prerelease in NPM #710

Publish prerelease in NPM

Publish prerelease in NPM #710

Workflow file for this run

name: Publish prerelease in NPM
on:
workflow_dispatch:
workflow_run:
workflows: [Tests]
types: [completed]
branches:
- 'develop'
- 'release/**'
- '!release/**-**'
env:
NODE_VERSION: 20
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # https://github.com/actions/checkout/releases/tag/v4.1.1
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # https://github.com/actions/setup-node/releases/tag/v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
cache: 'npm'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION }}
- run: npm install
- run: npm run pre-release