Skip to content

Manual NPM Publish #516

Manual NPM Publish

Manual NPM Publish #516

Workflow file for this run

name: Manual NPM Publish
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release Type"
required: true
type: choice
default: "patch"
options:
- patch
- minor
- major
distTag:
description: 'NPM tag (e.g. use "next --canary" to release a test version, add "--force-publish" to release all packages)'
required: true
default: 'latest'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
jobs:
authorize:
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.1.9
with:
route: GET /orgs/:organisation/teams/:team/memberships/${{ github.actor }}
team: technical-steering-committee
organisation: webdriverio
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
release:
permissions:
contents: write
id-token: write
needs: [authorize]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'v8'
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
- 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 "bot@webdriver.io"
git config --global user.name "WebdriverIO Release Bot"
- name: Install Dependencies
run: npm ci
- name: Release
run: |
npm run setup
npm run generate:typings
npx lerna publish ${{github.event.inputs.releaseType}} --exact --yes --dist-tag ${{github.event.inputs.distTag}}
npm run pushReleaseTag
env:
NODE_ENV: production
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}