-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.43 KB
/
dev-tagger.yaml
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
name: Auto Version Tag
on:
pull_request:
branches:
- dev
types:
- closed
jobs:
Tagging:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.NPM_VERSIONER_APP_ID }}
private-key: ${{ secrets.NPM_VERSIONER_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- name: git setting
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: npm tag(Major)
if: contains(github.event.pull_request.labels.*.name, 'PR:major')
run: |
npm version premajor
- name: npm tag(Minor)
if: contains(github.event.pull_request.labels.*.name, 'PR:minor')
run: |
npm version preminor
- name: npm tag(Patch)
if: contains(github.event.pull_request.labels.*.name, 'PR:patch')
run: |
npm version prepatch
- name: npm tag(release)
if: contains(github.event.pull_request.labels.*.name, 'PR:release')
run: |
npm version prerelease
- name: Push
run: |
git push --all
git push --tags