forked from Ents24/testcafe-browser-provider-fbsimctl
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.42 KB
/
release.yml
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
name: Release
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release type - major, minor or patch"
required: true
default: ""
preReleaseFlavor:
description: "Pre-Release flavor - rc, alpha, beta etc."
required: false
default: ""
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Setup Git
run: |
git config --global user.name "devx-sauce-bot"
git config --global user.email "devx.bot@saucelabs.com"
- name: Login to NPM
run: npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Release
if: ${{ github.event.inputs.releaseType != '' }}
run: |
if [ -n "${{ github.event.inputs.preReleaseFlavor }}" ];then
PRE_RELEASE_ARGS="--preRelease=${{ github.event.inputs.preReleaseFlavor }} --github.preRelease"
fi
npm run release:ci -- ${{ github.event.inputs.releaseType }} ${PRE_RELEASE_ARGS}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}