-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (70 loc) · 2.29 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
push:
branches:
- master
jobs:
release-action:
runs-on: ubuntu-latest
name: Release release-it action
steps:
- name: Setup node.js
uses: actions/[email protected]
with:
node-version: 12
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Install dependencies
run: npm ci
- name: Bump version
if: "github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), 'chore(release)')"
id: bump-version
uses: ./
env:
DEBUG: release-it:*
with:
github-token: ${{ secrets.AUTO_PAT }}
github-username: TRW-bot
git-user-name: TheRealWaldo-bot
git-user-email: [email protected]
create-branch: release
auto-resolve-command: npm run build && git add dist/**
rebase-onto: master
no-increment: false
json-opts: '{"github": {"release": false}}'
debug: true
- name: Create pull request
if: "github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), 'chore(release)')"
uses: TheRealWaldo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.AUTO_PAT }}
with:
draft: true
title: 'chore(release): v${{steps.bump-version.outputs.version}}'
body: ${{steps.bump-version.outputs.changelog}}
base: master
head: release
assignee: TheRealWaldo
- name: Release
if: "github.ref == 'refs/heads/master' && contains(toJSON(github.event.commits.*.message), 'chore(release)')"
uses: ./
env:
DEBUG: release-it:*
with:
no-increment: true
github-token: ${{ secrets.AUTO_PAT }}
debug: true
json-opts: >
{
"github": { "release": true },
"git": { "tag": true, "commit": false },
"plugins": {
"@release-it/bumper": {
"in": { "file": "VERSION", "type": "text/plain" }
},
"@release-it/conventional-changelog": { "ignoreRecommendedBump": true }
}
}