Skip to content

Manual NPM Publish

Manual NPM Publish #11

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_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: ⬇️ Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
- name: 🐢 Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: 🏗️ Install Dependencies
run: pnpm install
shell: bash
- name: 📦 NPM Setup
run: |
npm set registry "https://registry.npmjs.org/"
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm whoami
- name: 📒 Git Setup
run: |
git config --global user.email "[email protected]"
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:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}