Skip to content

Commit 5404286

Browse files
committed
(fix)Changing the headings of CHANGELOG.md so they all display the version number without 'v' prefix
Adding a automatic GitHub release creation from the corresponding CHANGELOG section
1 parent f5d7353 commit 5404286

2 files changed

Lines changed: 49 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,30 @@ jobs:
8989
run: |
9090
cd lambda-appsync
9191
cargo publish --allow-dirty
92+
93+
release:
94+
name: Create GitHub Release
95+
needs: publish-main
96+
runs-on: ubuntu-latest
97+
permissions:
98+
contents: write
99+
steps:
100+
- uses: actions/checkout@v4
101+
102+
- name: Extract changelog section
103+
run: |
104+
VERSION="${GITHUB_REF_NAME#v}"
105+
awk -v ver="$VERSION" '
106+
/^## \[/ {
107+
if (found) exit
108+
split($0, a, /[\[\]]/)
109+
if (a[2] == ver) { found=1; next }
110+
}
111+
found && /^\[[0-9]+\.[0-9]+\.[0-9]+\]: / { next }
112+
found { print }
113+
' CHANGELOG.md | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba;}' > /tmp/release-body.md
114+
115+
- name: Create GitHub release
116+
env:
117+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
run: gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file /tmp/release-body.md

CHANGELOG.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146146

147147
[0.6.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.4...v0.6.0
148148

149-
## [v0.5.4] - 2025-04-24
149+
## [0.5.4] - 2025-04-24
150150

151151
### Fixed
152152
- Bug where the `type_override` option was not working correctly for fields or arguments that were Rust keywords
153153

154-
[v0.5.4]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.3...v0.5.4
154+
[0.5.4]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.3...v0.5.4
155155

156-
## [v0.5.3] - 2025-04-24
156+
## [0.5.3] - 2025-04-24
157157

158158
### Changed
159159
- Deprecated `field_type_override` option in favor of `type_override` to better reflect its broader scope covering both fields and arguments
160160
- (For project devs) Improved internal implementation of type override options for better clarity
161161

162-
[v0.5.3]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.2...v0.5.3
162+
[0.5.3]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.2...v0.5.3
163163

164-
## [v0.5.2] - 2025-04-23
164+
## [0.5.2] - 2025-04-23
165165

166166
### Added
167167
- Extended type override capabilities to support operation return types and arguments
@@ -173,19 +173,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
173173
### Fixed
174174
- Bug in `keep_original_function_name` attribute where it would fail when operation handlers had arguments
175175

176-
[v0.5.2]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.1...v0.5.2
176+
[0.5.2]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.1...v0.5.2
177177

178-
## [v0.5.1] - 2025-04-21
178+
## [0.5.1] - 2025-04-21
179179

180180
### Changed
181181
- Improved internal documentation linking structure between crates
182182

183183
### Fixed
184184
- Documentation linking issues between lambda-appsync and lambda-appsync-proc crates
185185

186-
[v0.5.1]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.0...v0.5.1
186+
[0.5.1]: https://github.com/RustyServerless/lambda-appsync/compare/v0.5.0...v0.5.1
187187

188-
## [v0.5.0] - 2025-04-21
188+
## [0.5.0] - 2025-04-21
189189

190190
### Added
191191
- New option to get a reference to the AppsyncEvent structure in operation handlers through the `with_appsync_event` attribute parameter
@@ -199,23 +199,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
199199
### Fixed
200200
- Missing documentation links in the crate documentation
201201

202-
[v0.5.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.2...v0.5.0
202+
[0.5.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.2...v0.5.0
203203

204-
## [v0.4.2] - 2025-04-19
204+
## [0.4.2] - 2025-04-19
205205

206206
### Fixed
207207
- Clippy warnings and code style improvements
208208

209-
[v0.4.2]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.1...v0.4.2
209+
[0.4.2]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.1...v0.4.2
210210

211-
## [v0.4.1] - 2025-04-19 [YANKED]
211+
## [0.4.1] - 2025-04-19 [YANKED]
212212

213213
### Changed
214214
- Enhanced test coverage for null handling in GraphQL schema type generation
215215

216-
[v0.4.1]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.0...v0.4.1
216+
[0.4.1]: https://github.com/RustyServerless/lambda-appsync/compare/v0.4.0...v0.4.1
217217

218-
## [v0.4.0] - 2025-04-19 [YANKED]
218+
## [0.4.0] - 2025-04-19 [YANKED]
219219

220220
### Added
221221
- Comprehensive integration tests for macro-generated structure serialization/deserialization
@@ -229,9 +229,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
229229
- Documentation examples and subscription filter code blocks
230230
- README referenced crate version
231231

232-
[v0.4.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.3.0...v0.4.0
232+
[0.4.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.3.0...v0.4.0
233233

234-
## [v0.3.0] - 2025-04-04
234+
## [0.3.0] - 2025-04-04
235235

236236
### Added
237237
- Support for AWS AppSync Enhanced Subscription Filters
@@ -250,9 +250,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
250250
- Memory allocation optimization
251251
- Documentation improvements
252252

253-
[v0.3.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.2.0...v0.3.0
253+
[0.3.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.2.0...v0.3.0
254254

255-
## [v0.2.0] - 2025-04-01
255+
## [0.2.0] - 2025-04-01
256256

257257
### Added
258258
- New `unauthorized` constructor for AppsyncResponse struct
@@ -267,9 +267,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
267267
- Improved documentation with compiled examples
268268
- Reorganized workspace dependencies
269269

270-
[v0.2.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.1.0...v0.2.0
270+
[0.2.0]: https://github.com/RustyServerless/lambda-appsync/compare/v0.1.0...v0.2.0
271271

272-
## [v0.1.0] - 2025-03-30
272+
## [0.1.0] - 2025-03-30
273273

274274
### Added
275275
- Initial release with core functionality
@@ -283,4 +283,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
283283
- Support for custom type overrides
284284
- Basic examples and documentation
285285

286-
[v0.1.0]: https://github.com/RustyServerless/lambda-appsync/releases/tag/v0.1.0
286+
[0.1.0]: https://github.com/RustyServerless/lambda-appsync/releases/tag/v0.1.0

0 commit comments

Comments
 (0)