Manual Release Publish #84
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: Manual Release Publish | |
on: | |
workflow_dispatch: | |
inputs: | |
npmTag: | |
description: 'NPM tag. Leave blank to use the default "latest" tag.' | |
required: true | |
default: 'latest' | |
releaseVersion: | |
description: 'The new version to create.' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
dryRun: | |
description: 'Do not touch or write anything. Show the commands.' | |
required: true | |
default: false | |
type: boolean | |
env: | |
DRY_RUN_ARG: ${{ inputs.dryRun && '--dry-run' || '' }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.7.1 | |
run_install: false | |
- name: Package Manager Setup | |
run: | | |
pnpm set registry "https://registry.npmjs.org/" | |
pnpm set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
pnpm whoami | |
- name: Git Setup | |
run: | | |
git config --global user.email "bot@webdriver.io" | |
git config --global user.name "WebdriverIO Release Bot" | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Release | |
run: | | |
pnpm run build | |
pnpm run package | |
pnpm run release -- ${{inputs.releaseVersion}} $DRY_RUN_ARG --npm.tag=${{inputs.npmTag}} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |