chore(release): 4.0.1#210
Conversation
Bump version to 4.0.1 and update changelog for the Alpine Linux 3.17+ (musl) build fix (aws#204).
7c1cb6b to
ab25e6e
Compare
| - name: Read version | ||
| id: version | ||
| run: | | ||
| VERSION="$(grep -Po '__version__\s*=\s*"\K[^"]+' awslambdaric/__init__.py)" |
There was a problem hiding this comment.
Can we use sed/aws instead (-Po is not posix)
There was a problem hiding this comment.
Done — replaced grep -Po with POSIX sed: sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p'.
| id: check | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| VERSION: ${{ steps.version.outputs.version }} |
There was a problem hiding this comment.
I believe the release check lives with reading the version and no need for a separate step for it and we could drop the extra check if version exists or not
There was a problem hiding this comment.
Done — merged the existing-release check into the version-read step, so there's no separate step now. I kept the check (rather than dropping it) because the trigger fires on any edit to awslambdaric/__init__.py; the guard keeps the workflow idempotent on re-runs and no-op edits instead of failing on a duplicate tag. Happy to drop it entirely if you'd prefer the loud failure.
There was a problem hiding this comment.
Updated — dropped the existence guard entirely. The workflow now just runs gh release create, which fails loudly if a release for that version already exists. The version-read step is now a single standalone step.
| VERSION: ${{ steps.version.outputs.version }} | ||
| run: | | ||
| if gh release view "$VERSION" >/dev/null 2>&1; then | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
(Nit-pick): I'd rename it to (release_exists or something like that)
There was a problem hiding this comment.
Done — renamed the output to release_exists.
| # Trim leading/trailing blank lines. | ||
| sed -i -e '/./,$!d' release-notes.md | ||
| if [ ! -s release-notes.md ]; then | ||
| echo "Release $VERSION" > release-notes.md |
There was a problem hiding this comment.
a version bump always means something changed, having the release body be just the version number isn't useful. I'd prefer the workflow to fail here, forcing the contributor to add a changelog entry before the release is created
There was a problem hiding this comment.
Done — dropped the bare-version fallback. The workflow now fails with a clear message if there's no matching \`` section in RELEASE.CHANGELOG.md, forcing a changelog entry before the release is created.
Adds a workflow that detects a change to __version__ in awslambdaric/__init__.py on main, then creates a tag and GitHub Release using notes from RELEASE.CHANGELOG.md. Skips if the release already exists.
Summary
Release
4.0.1of the AWS Lambda Python Runtime Interface Client, plus release automation.Bumps the version from
4.0.0to4.0.1, adds the changelog entry, and adds a workflow to auto-create GitHub Releases on future version bumps.Release content
libexecinfo-dev(fix: support building on Alpine Linux 3.17+ (musl) without libexecinfo-dev #204)multi_concurrent_utils(Lazy load multi-concurrent utilities for cold start improvement #211)Changes
awslambdaric/__init__.py:__version__4.0.0 → 4.0.1RELEASE.CHANGELOG.md: added4.0.1entry.github/workflows/release-on-version-change.yml: new workflow that, on push tomaintouchingawslambdaric/__init__.py, creates a tag + GitHub Release (titledAWS Lambda Runtime Interface Client for Python v<version>) with notes pulled from the matchingRELEASE.CHANGELOG.mdsection. Skips if a release for that version already exists.Notes
GITHUB_TOKENwithcontents: write(scoped to this job only).4.0.1release automatically.main(includes fix: support building on Alpine Linux 3.17+ (musl) without libexecinfo-dev #204 and Lazy load multi-concurrent utilities for cold start improvement #211).Testing