-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (41 loc) · 1.29 KB
/
dev-pr-close.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
name: 'Dev - PR Close'
on:
pull_request:
branches:
- master
types:
- closed
jobs:
merge_pr:
name: 'PR Merged'
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mheap/github-action-required-labels@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: exactly
count: 1
labels: 'major, minor, patch'
- name: Git config
env:
GH_ORG_EMAIL: "WikiGDrive"
GH_ORG_NAME: "wikigdrive@wikigdrive.com"
run: |
git config --global user.email "${GH_ORG_EMAIL}"
git config --global user.name "${GH_ORG_NAME}"
- name: Apply version bump (major)
if: contains(github.event.pull_request.labels.*.name, 'major')
run: npm version major
- name: Apply version bump (minor)
if: contains(github.event.pull_request.labels.*.name, 'minor')
run: npm version minor
- name: Apply version bump (patch)
if: contains(github.event.pull_request.labels.*.name, 'patch')
run: npm version patch
- name: Git push version bump
run: git push origin master --follow-tags --force
- name: Output current version
run: npm pkg get version