-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.5 KB
/
tag-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Tag Release CI on PR Merge to Development
on:
workflow_dispatch:
inputs:
version_type:
type: choice
description: Choose version bump type
options:
- -r major
- -r minor
- -r patch
- -p alpha
- -p beta
- -p build
- -p hotfix
- -p build
required: true
default: "-p build"
pull_request:
types:
- closed
branches:
- 'development'
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# - name: Set up Node.js
# uses: actions/setup-node@v2
# with:
# node-version: 14
# - name: Install Dependencies
# run: npm install
# - name: Run Tests
# run: npm test
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'development'
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# with:
# path: development
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Change version
run: npm run release -- ${{ github.event.inputs.repo_names }}
- name: Push Tags
run: git push --follow-tags origin development
# npm run release -- -r patch
# npm run release -- --prerelease beta