-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.releaserc.yaml
131 lines (123 loc) · 4.17 KB
/
.releaserc.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
# Branches from where releases can happen
branches:
- main
- master
# Print additional info
debug: true
# Use 'conventionalcommits' preset instead of the default 'angular'
# this will passed down to all plugins
preset: conventionalcommits
# List of plugins to use.
# Since this project is an Ansible collection we won't use the npm plugin.
# We use the changelog plugin to generate CHANGELOG.md and git plugin to commit it
plugins:
# Analyze that commits conform to the preset specification
- - "@semantic-release/commit-analyzer"
- releaseRules:
- type: feat
release: minor
- type: fix
release: patch
- type: docs
release: patch
- type: perf
release: patch
- type: refactor
release: patch
- type: revert
release: patch
- type: chore
release: false
- type: build
release: false
- type: ci
release: false
- type: test
release: false
- type: style
release: false
parserOpts:
noteKeywords:
- BREAKING CHANGE
- BREAKING CHANGES
- BREAKING
# Generate release notes. These will be embedded in the Github release body
- - "@semantic-release/release-notes-generator"
- presetConfig:
types:
- type: feat
section: ":sparkles: Features"
- type: fix
section: ":bug: Bug Fixes"
- type: docs
section: ":eyes: Misc"
- type: chore
section: ":eyes: Misc"
- type: perf
section: ":muscle: Improvements"
- type: refactor
section: ":muscle: Improvements"
- type: style
section: ":muscle: Improvements"
- type: ci
section: ":robot: Automation"
- type: build
section: ":robot: Automation"
- type: test
section: ":robot: Automation"
- type: revert
section: ":poop: Revert"
writerOpts:
groupBy: type
# commitGroupsSort: title
commitGroupsSort:
- feat
- fix
- perf
- refactor
- style
- ci
- build
- test
- revert
- docs
- chore
commitsSort: header
# commitsSort:
# - scope
# - subject
parserOpts:
noteKeywords:
- BREAKING CHANGE
- BREAKING CHANGES
- BREAKING
# Generate us a changelog file
- - "@semantic-release/changelog"
- changelogFile: CHANGELOG.md
# Execute a command (ie update the collection version in galaxy.yml prior to building the collection)
- - "@semantic-release/exec"
- prepareCmd: "sed -i 's/^version:.*/version: ${nextRelease.version}/g' ansible_collections/donhector/workstation/galaxy.yml"
- - "@semantic-release/exec"
- prepareCmd: "sed -i 's/^version.*/version = \"${nextRelease.version}\"/g' pyproject.toml"
# Commit the generated changelog file into our git repo.
# Since we are enforcing conventional commmits in our project,
# we ensure the commit message also follows the specification.
# Additionally, to prevent this commit from triggering a new release workflow
# (ie. infinite release loop), we use the '[skip ci]' text,
# so our release workflow logic can easily filter out / ignore these kind of commits.
# In fact, since recently, Github workflows knows how to handle this logic automatically
# See (https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/)
- - "@semantic-release/git"
- assets:
- CHANGELOG.md
- ansible_collections/donhector/workstation/galaxy.yml
- pyproject.toml
message: "ci(release): update collection to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
# Create a release in Github
- - "@semantic-release/github"
- assets:
- path: LICENSE
label: LICENSE
- path: ansible_collections/donhector/workstation/donhector-workstation-${nextRelease.version}.tar.gz
label: donhector-workstation-${nextRelease.version}.tar.gz