webdriverio/.github/workflows/publish.yml
Christian Bromann 80779bb429
breaking(build): migrate to Esbuild for bundling (#13338)
* breaking(build): migrate to Rollup for bundling

* migrate more packages

* progress

* delete unnecessary tsconfigs

* migrate to esbuild

* revert npmignore changes

* more tweaks

* update pnpm-lock

* more tweaks

* compile scripts within browser environment

* fix ts issue in webdriverio

* add infra/compiler to readme

* fix lock file

* remove virtual:wdio from lock file

* update docs

* fix tests

* fix component tests

* fix unit tests

* clean up

* remove original build script

* more cleanups

* more cleanups

* last cleanup
2024-08-08 23:47:30 -07:00

69 lines
2 KiB
YAML

name: Manual NPM Publish
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release Type"
required: true
type: choice
default: "patch"
options:
- patch
- minor
- major
- premajor
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}}
# disable provenance check as it stopped working with Lerna:
# > lerna ERR! E422 Error verifying sigstore provenance bundle: Failed to validate the provenance
# > subject against the package name, version and tarball integrity. Please try re-publishing with
# > the latest stable version of npm
# NPM_CONFIG_PROVENANCE: true
jobs:
authorize:
name: Authorize Actor
uses: ./.github/workflows/authorize.yml
secrets: inherit
release:
permissions:
contents: write
id-token: write
needs: [authorize]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: NPM Setup
run: |
npm i -g npm
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: pnpm install
- name: Release
run: |
pnpm run setup
pnpm lerna publish ${{github.event.inputs.releaseType}} --exact --yes --dist-tag ${{github.event.inputs.distTag}}
pnpm run pushReleaseTag
env:
NODE_ENV: production
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}