-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
781f3cc
commit 7a7c713
Showing
3 changed files
with
7,461 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
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' | ||
preRelease: | ||
description: If latest release was a pre-release (e.g. X.X.X-alpha.0) and you want to push another one, pick "yes" | ||
required: true | ||
type: choice | ||
default: "no" | ||
options: | ||
- "yes" | ||
- "no" | ||
|
||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: 'main' | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
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 "[email protected]" | ||
git config --global user.name "WebdriverIO Release Bot" | ||
- 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 }} | ||
if: ${{ github.event.inputs.preRelease == 'no' }} | ||
- name: Pre-Release | ||
run: npx release-it ${{github.event.inputs.releaseType}} --github.release --ci --npm.skipChecks --no-git.requireCleanWorkingDir --preRelease=alpha --github.preRelease --npm.tag=next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event.inputs.preRelease == 'yes' }} |
Oops, something went wrong.