Skip to content

Commit 0cbc32e

Browse files
authored
Merge pull request #4 from webdriverio-community/cb-add-release-pipeline
Automate Release Process
2 parents 0edd4ee + d4a387d commit 0cbc32e

File tree

3 files changed

+1764
-35
lines changed

3 files changed

+1764
-35
lines changed

.github/workflows/release.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Manual NPM Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseType:
7+
description: 'Release type - major, minor or patch'
8+
required: true
9+
default: 'patch'
10+
distTag:
11+
description: 'NPM tag (e.g. use "next" to release a test version)'
12+
required: true
13+
default: 'latest'
14+
15+
env:
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
18+
jobs:
19+
release:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
ref: 'main'
25+
fetch-depth: 0
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 14.x
29+
- name: NPM Setup
30+
run: |
31+
npm set registry "https://registry.npmjs.org/"
32+
npm set //registry.npmjs.org/:_authToken $NPM_TOKEN
33+
npm whoami
34+
- name: Git Setup
35+
run: |
36+
git config --global user.email "community@webdriver.io"
37+
git config --global user.name "WebdriverIO Release Bot"
38+
- name: Install Dependencies
39+
run: npm ci
40+
- name: Build Project
41+
run: npm run build
42+
env:
43+
NODE_ENV: production
44+
- name: Release
45+
run: npm run release:ci -- ${{github.event.inputs.releaseType}} --npm.tag=${{github.event.inputs.distTag}}
46+
env:
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)