Skip to content

Commit b09bdd7

Browse files
authored
ci: update the changelog file generation (#78)
* ci: update the changelog file generation * ci: split jobs
1 parent b2fa01f commit b09bdd7

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
release:
1818
name: release
19-
runs-on: "ubuntu-latest"
19+
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
steps:
2222
- uses: actions/checkout@v6
@@ -74,7 +74,7 @@ jobs:
7474
echo "and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)." >> "$GITHUB_OUTPUT"
7575
echo "" >> "$GITHUB_OUTPUT"
7676
77-
git cliff --config ./cliff.toml --latest --strip header | awk 'NF{p=1} p' | tail -n +2 >> "$GITHUB_OUTPUT"
77+
git cliff --config ./cliff.toml --tag ${{ steps.next-version.outputs.NEXT_VERSION }} --unreleased --strip header | awk 'NF{p=1} p' | tail -n +2 >> "$GITHUB_OUTPUT"
7878
7979
echo "EOF" >> "$GITHUB_OUTPUT"
8080
- name: Commit changes
@@ -96,18 +96,28 @@ jobs:
9696
tag_name: ${{ steps.next-version.outputs.NEXT_VERSION }}
9797
body: ${{ steps.release-notes.outputs.RELEASE_NOTES }}
9898
target_commitish: ${{ steps.auto-commit-action.outputs.commit_hash }}
99+
100+
docc:
101+
name: build and deploy docc
102+
runs-on: macos-latest
103+
needs: release
104+
if: ${{ needs.release.outputs.has-changes == 'true' }}
105+
timeout-minutes: 15
106+
steps:
107+
- uses: actions/checkout@v6
108+
with:
109+
ref: ${{ needs.release.outputs.commit-hash }}
110+
fetch-depth: 0
99111
- name: Build DocC
100112
id: build
101113
uses: space-code/build-docc@main
102-
if: steps.check-changes.outputs.has-changes == 'true'
103114
with:
104115
schemes: '["ValidatorCore", "ValidatorUI"]'
105-
version: ${{ steps.next-version.outputs.NEXT_VERSION }}
116+
version: ${{ needs.release.outputs.next-version }}
106117
- name: Generate Index Page
107118
uses: space-code/generate-index@v1.0.0
108-
if: steps.check-changes.outputs.has-changes == 'true'
109119
with:
110-
version: ${{ steps.next-version.outputs.NEXT_VERSION }}
120+
version: ${{ needs.release.outputs.next-version }}
111121
project-name: 'Validator'
112122
project-description: 'Validator is a modern, lightweight Swift framework that provides elegant and type-safe input validation.'
113123
modules: |
@@ -127,7 +137,6 @@ jobs:
127137
]
128138
- name: Deploy
129139
uses: peaceiris/actions-gh-pages@v4
130-
if: steps.check-changes.outputs.has-changes == 'true'
131140
with:
132141
github_token: ${{ secrets.GITHUB_TOKEN }}
133142
publish_dir: ./docs

CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
#### 1.x Releases
9-
- `1.3.x` Releases - [1.3.0](#130)
109
- `1.2.x` Releases - [1.2.0](#120)
1110
- `1.1.x` Releases - [1.1.0](#110)
1211
- `1.0.x` Releases - [1.0.1](#101) | [1.0.0](#100)
1312

1413
---
15-
16-
17-
## [1.3.0](https://github.com/space-code/validator/releases/tag/1.3.0)
18-
19-
Released on 2025-11-28. All issues associated with this milestone can be found using this [filter](https://github.com/space-code/validator/milestones?state=closed&q=1.3.0).
14+
## [Unreleased]
2015

2116
### Bug Fixes
2217
- Fix the lint action
@@ -168,8 +163,7 @@ Released on 2023-10-09. All issues associated with this milestone can be found u
168163
- Implement `Validator` package
169164
- Contributed by [@ns-vasilev](https://github.com/ns-vasilev) in Pull Request [#1](https://github.com/space-code/validator/pull/1).
170165

171-
[1.3.0]: https://github.com/space-code/validator/compare/1.2.0..1.3.0
166+
[unreleased]: https://github.com/space-code/validator/compare/1.2.0..HEAD
172167
[1.2.0]: https://github.com/space-code/validator/compare/1.1.0..1.2.0
173168
[1.1.0]: https://github.com/space-code/validator/compare/1.0.1..1.1.0
174169
[1.0.1]: https://github.com/space-code/validator/compare/1.0.0..1.0.1
175-

0 commit comments

Comments
 (0)