-
-
Notifications
You must be signed in to change notification settings - Fork 40
61 lines (52 loc) · 1.59 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (52 loc) · 1.59 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
61
name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: "Release type (major/minor/patch)"
required: true
default: "minor"
type: choice
options:
- major
- minor
- patch
jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Checkout source code
uses: actions/checkout@v2
- name: Install the dependencies
run: pnpm install
- name: Initialise the NPM config
run: pnpm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Initialize Git user
run: |
git config --global user.email "shubpramanik241@gmail.com"
git config --global user.name "sourabpramanik"
- name: Log git status
run: git status
- name: Run release major
if: github.event.inputs.release_type == 'major'
run: pnpm release:major
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run release minor
if: github.event.inputs.release_type == 'minor'
run: pnpm release:minor
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run release patch
if: github.event.inputs.release_type == 'patch'
run: pnpm release:patch
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}