forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.71 KB
/
Copy pathpublish.yml
File metadata and controls
60 lines (57 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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_CONFIG_PROVENANCE: true
jobs:
authorize:
name: Authorize Actor
uses: ./.github/workflows/authorize.yml
secrets: inherit
release:
permissions:
contents: write
id-token: write
packages: read
needs: [authorize]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: 'main'
fetch-depth: 0
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- 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 -r --filter=@wdio/lerna-patch run patch
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 }}