You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,45 @@ Note that you probably want to set the `git-user` and `git-user-email` options t
102
102
If you are not familiar with how cocogitto perform release, you might want to read the [auto bump](https://github.com/cocogitto/cocogitto#auto-bump)
103
103
and [hook](https://github.com/cocogitto/cocogitto#auto-bump) sections on cocogitto's documentation.
104
104
105
+
## Generating a Changelog
106
+
107
+
You can also use this action to generate a changelog for your releases.
108
+
109
+
Here's an example of how to set up a GitHub Actions workflow to generate a changelog when a new tag is pushed:
110
+
111
+
```yaml
112
+
name: Create Release
113
+
114
+
on:
115
+
push:
116
+
tags:
117
+
- "v*.*.*"
118
+
119
+
jobs:
120
+
create_release:
121
+
name: Publish release
122
+
runs-on: ubuntu-latest
123
+
steps:
124
+
- uses: actions/checkout@v4
125
+
with:
126
+
fetch-depth: 0
127
+
128
+
- name: SemVer release
129
+
id: release
130
+
uses: cocogitto/cocogitto-action@main
131
+
with:
132
+
command: changelog
133
+
args: --at ${{ github.ref_name }}
134
+
135
+
- name: Upload github release
136
+
uses: softprops/action-gh-release@v2
137
+
with:
138
+
body: ${{ steps.release.outputs.stdout }}
139
+
tag_name: ${{ github.ref_name }}
140
+
```
141
+
142
+
In this example, the workflow is triggered on a push event when a new tag matching the pattern `v*.*.*` is created. The `cocogitto-action` is used to generate a changelog for the release, and the `softprops/action-gh-release` action is used to create a GitHub release with the generated changelog as the release body.
143
+
105
144
## Post step run
106
145
107
146
Once the step is finished cocogitto's binary will be available in your path.
@@ -114,3 +153,10 @@ Here are all the inputs available through `with`:
0 commit comments