Skip to content

chore(release): 4.0.1#210

Merged
M-Elsaeed merged 2 commits into
aws:mainfrom
M-Elsaeed:release/4.0.1
Jun 26, 2026
Merged

chore(release): 4.0.1#210
M-Elsaeed merged 2 commits into
aws:mainfrom
M-Elsaeed:release/4.0.1

Conversation

@M-Elsaeed

@M-Elsaeed M-Elsaeed commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Release 4.0.1 of the AWS Lambda Python Runtime Interface Client, plus release automation.

Bumps the version from 4.0.0 to 4.0.1, adds the changelog entry, and adds a workflow to auto-create GitHub Releases on future version bumps.

Release content

Changes

  • awslambdaric/__init__.py: __version__ 4.0.0 → 4.0.1
  • RELEASE.CHANGELOG.md: added 4.0.1 entry
  • .github/workflows/release-on-version-change.yml: new workflow that, on push to main touching awslambdaric/__init__.py, creates a tag + GitHub Release (titled AWS Lambda Runtime Interface Client for Python v<version>) with notes pulled from the matching RELEASE.CHANGELOG.md section. Skips if a release for that version already exists.

Notes

Testing

Bump version to 4.0.1 and update changelog for the Alpine Linux 3.17+
(musl) build fix (aws#204).
@M-Elsaeed M-Elsaeed force-pushed the release/4.0.1 branch 2 times, most recently from 7c1cb6b to ab25e6e Compare June 25, 2026 16:27
- name: Read version
id: version
run: |
VERSION="$(grep -Po '__version__\s*=\s*"\K[^"]+' awslambdaric/__init__.py)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use sed/aws instead (-Po is not posix)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Nit-pick): I'd rename it to (release_exists or something like that)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@darklight3it darklight3it left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@M-Elsaeed M-Elsaeed merged commit 46e4c6a into aws:main Jun 26, 2026
34 checks passed
@M-Elsaeed M-Elsaeed deleted the release/4.0.1 branch June 26, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants