diff --git a/.github/workflows/release-automation.yml b/.github/workflows/release-automation.yml index 42b2d3e..186f0e5 100644 --- a/.github/workflows/release-automation.yml +++ b/.github/workflows/release-automation.yml @@ -1,14 +1,16 @@ name: Release Automation on: - push: - branches: - - master + pull_request: + types: [closed] jobs: create_release: - # We only run it for merge commits from branches release/* - if: startsWith(github.event.head_commit.message, 'Merge pull request') && contains(github.event.head_commit.message, 'from release/') + # We only run it for merged PRs from a release/* branch into master. + if: | + github.event.pull_request.merged == true && + github.event.pull_request.base.ref == 'master' && + startsWith(github.event.pull_request.head.ref, 'release/') runs-on: ubuntu-latest permissions: contents: write # to create tags and releases @@ -17,7 +19,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - # I need a complete history to read the tags and create a PR + # We check out the master branch, which is the state after the merge. + ref: 'master' fetch-depth: 0 - name: Get Version diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f17e5f..5ab8d46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [NextRelease] +### Header + +- **subtitle**: describtion + +## [1.3.4] + ### Fixed - **Deterministic Processing**: Fixed a critical bug that caused line numbers in the table of contents to change on every run. This was due to inconsistent newline handling after removing an existing agent docstring. The process is now fully idempotent. diff --git a/agent_docstrings/__init__.py b/agent_docstrings/__init__.py index f48ede6..5f5575c 100644 --- a/agent_docstrings/__init__.py +++ b/agent_docstrings/__init__.py @@ -7,4 +7,4 @@ Attributes: __version__ (str): Current version of the *agent-docstrings* package. """ -__version__ = "1.3.3" \ No newline at end of file +__version__ = "1.3.4" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 04d4b66..b2808cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "agent-docstrings" -version = "1.3.3" +version = "1.3.4" description = "A command-line tool to auto-generate and update file-level docstrings summarizing classes and functions. Useful for maintaining a high-level overview of your files, especially in projects with code generated or modified by AI assistants." readme = { file = "README.md", content-type = "text/markdown" } license = { file = "LICENSE" } @@ -148,7 +148,7 @@ exclude_lines = [ ] [tool.bumpversion] -current_version = "1.3.3" +current_version = "1.3.4" commit = false tag = false