Skip to content

Commit 2551b88

Browse files
authored
chore(ci): add changelog.yml workflow (#25)
1 parent 95a4037 commit 2551b88

File tree

3 files changed

+367
-18
lines changed

3 files changed

+367
-18
lines changed

.github/workflows/changelog.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: update-changelog
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
changelog:
10+
name: Update CHANGELOG
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 15
13+
if: |
14+
!startsWith(github.event.head_commit.message, '[Release]') &&
15+
!startsWith(github.event.head_commit.message, 'chore(changelog): update CHANGELOG.md') &&
16+
github.event.head_commit.author.name != 'github-actions[bot]'
17+
steps:
18+
- uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 0
21+
- uses: jdx/mise-action@v3
22+
with:
23+
experimental: true
24+
- name: Generate CHANGELOG.md
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: git cliff --config ./cliff.toml -o ./CHANGELOG.md
28+
- name: Check for CHANGELOG changes
29+
id: changelog-changes
30+
run: |
31+
if git diff --quiet CHANGELOG.md; then
32+
echo "No changes in CHANGELOG.md"
33+
echo "has-changes=false" >> $GITHUB_OUTPUT
34+
else
35+
echo "CHANGELOG.md has changes"
36+
echo "has-changes=true" >> $GITHUB_OUTPUT
37+
fi
38+
- name: Commit CHANGELOG
39+
uses: stefanzweifel/git-auto-commit-action@v7
40+
if: steps.changelog-changes.outputs.has-changes == 'true'
41+
with:
42+
commit_message: "chore(changelog): update CHANGELOG.md"
43+
commit_options: '--no-verify'
44+
file_pattern: CHANGELOG.md
45+
commit_user_name: github-actions[bot]
46+
commit_user_email: github-actions[bot]@users.noreply.github.com

CHANGELOG.md

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,68 @@
1-
# Change Log
1+
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
48
#### 1.x Releases
59
- `1.2.x` Releases - [1.2.0](#120)
610
- `1.1.x` Releases - [1.1.0](#110)
711
- `1.0.x` Releases - [1.0.0](#100)
812

13+
---
14+
## [Unreleased]
15+
16+
### Miscellaneous Tasks
17+
- Update workflow to run tests and build project
18+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#20](https://github.com/space-code/log/pull/20).
19+
- Automate code formatting and linting with git hooks
20+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#24](https://github.com/space-code/log/pull/24).
21+
- Update danger
22+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#23](https://github.com/space-code/log/pull/23).
23+
- Update config
24+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#16](https://github.com/space-code/log/pull/16).
25+
26+
### Uncategorized Changes
27+
- Add renovate.json
28+
- Contributed by [@renovate[bot]](https://github.com/renovate[bot]) in Pull Request [#12](https://github.com/space-code/log/pull/12).
29+
- Update `Gemfile.lock`
30+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#11](https://github.com/space-code/log/pull/11).
31+
32+
### New Contributors
33+
* @renovate[bot] made their first contribution in [#14](https://github.com/space-code/log/pull/14)
34+
935
## [1.2.0](https://github.com/space-code/log/releases/tag/1.2.0)
10-
Released on 2024-12-25.
1136

12-
#### Added
13-
- Bump the Swift version to 6.0.
14-
- Added in Pull Request [#5](https://github.com/space-code/log/pull/6).
37+
Released on 2024-12-25. All issues associated with this milestone can be found using this [filter](https://github.com/space-code/log/milestones?state=closed&q=1.2.0).
38+
39+
### Uncategorized Changes
40+
- Release `1.2.0`
41+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#10](https://github.com/space-code/log/pull/10).
42+
- Bump the Swift version to 6.0
43+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#8](https://github.com/space-code/log/pull/8).
44+
- Update `Gemfile`
45+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#9](https://github.com/space-code/log/pull/9).
1546

1647
## [1.1.0](https://github.com/space-code/log/releases/tag/1.1.0)
1748

18-
#### Added
19-
- Make the `logLevel` property changeable
20-
- Added in Pull Request [#5](https://github.com/space-code/log/pull/5).
21-
- Add files to comply with community standards
22-
- Added in Pull Request [#4](https://github.com/space-code/log/pull/4).
23-
- Update GitHub Actions workflow
24-
- Added in Pull Request [#3](https://github.com/space-code/log/pull/3).
25-
- Hide `IOSWriter` & `IConsoleWriter` from the public interface
26-
- Added in Pull Request [#2](https://github.com/space-code/log/pull/2).
49+
Released on 2024-01-19. All issues associated with this milestone can be found using this [filter](https://github.com/space-code/log/milestones?state=closed&q=1.1.0).
50+
51+
### Uncategorized Changes
52+
- Release `1.1.0`
53+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#7](https://github.com/space-code/log/pull/7).
54+
- Update `CHANGELOG.md`
55+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#6](https://github.com/space-code/log/pull/6).
2756

2857
## [1.0.0](https://github.com/space-code/log/releases/tag/1.0.0)
29-
Released on 2023-10-18.
3058

31-
#### Added
32-
- Initial release of log.
33-
- Added by [Nikita Vasilev](https://github.com/nik3212).
59+
Released on 2023-10-18. All issues associated with this milestone can be found using this [filter](https://github.com/space-code/log/milestones?state=closed&q=1.0.0).
60+
61+
### Uncategorized Changes
62+
- Release `1.0.0`
63+
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#1](https://github.com/space-code/log/pull/1).
64+
65+
[unreleased]: https://github.com/space-code/log/compare/1.2.0..HEAD
66+
[1.2.0]: https://github.com/space-code/log/compare/1.1.0..1.2.0
67+
[1.1.0]: https://github.com/space-code/log/compare/1.0.0..1.1.0
68+

0 commit comments

Comments
 (0)