Skip to content

Manual NPM Publish

Manual NPM Publish #18

Workflow file for this run

name: Manual NPM Publish
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release type - major, minor or patch"
required: true
type: choice
default: "patch"
options:
- patch
- minor
- major
distTag:
description: 'NPM tag (e.g. use "next" to release a test version)'
required: true
default: "latest"
env:
NPM_CONFIG_PROVENANCE: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: ⬇️ Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: 📦 Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: 🐢 Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: 🏗️ Install Dependencies
run: pnpm install
shell: bash
- name: 📒 Git Setup
run: |
git config --global user.email "bot@webdriver.io"
git config --global user.name "WebdriverIO Release Bot"
- name: 👷 Build
run: pnpm run build
- name: 🚀 Release
run: npx release-it ${{github.event.inputs.releaseType}} --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --npm.tag=${{github.event.inputs.distTag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_REGISTRY: https://registry.npmjs.org/