Skip to content

Commit

Permalink
fix: Update the action that checks for unreleased changelog items to …
Browse files Browse the repository at this point in the history
…always create the template files necessary for semantic-release (#302)

* fix: Update the action that checks for unreleased changelog items to always create the template files necessary for semantic-release

* refactor: Update note in summary to account for the reusable workflow name
  • Loading branch information
nfelt14 authored Jan 4, 2025
1 parent df28663 commit b8df761
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_reusable-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Add note to summary
run: |
echo "## Python Semantic Release Preview (noop)" >> "$GITHUB_STEP_SUMMARY"
echo "See the stdout from the \`Python Semantic Release (noop for preview)\` step in the \`print-inputs\` job for more details." >> "$GITHUB_STEP_SUMMARY"
echo "See the stdout from the \`Python Semantic Release (noop for preview)\` step in the \`package-release / print-inputs\` job for more details." >> "$GITHUB_STEP_SUMMARY"
outputs:
found-changes: ${{ (steps.find-changes-local.outputs.found-changes && fromJSON(steps.find-changes-local.outputs.found-changes)) || (steps.find-changes-public.outputs.found-changes && fromJSON(steps.find-changes-public.outputs.found-changes)) }}
# Update the package version using the python-semantic-release package (https://github.com/python-semantic-release/python-semantic-release)
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Things to be included in the next release go here.

- Bumped dependency versions.

### Fixed

- Fixed the `package-release` workflow to no longer have issues with the `semantic-release --noop` command.

---

## v1.6.0 (2025-01-03)
Expand Down
7 changes: 3 additions & 4 deletions actions/find_unreleased_changelog_items/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,9 @@ def main() -> None:
issue_messages.append("No PRs have been merged since the last release")

# Copy the files to the correct location
if not issue_messages:
shutil.copy(CHANGELOG_FILE, template_changelog_filepath)
with template_release_notes_filepath.open("w", encoding="utf-8") as template_release_notes:
template_release_notes.write(release_notes_content.strip() + "\n")
shutil.copy(CHANGELOG_FILE, template_changelog_filepath)
with template_release_notes_filepath.open("w", encoding="utf-8") as template_release_notes:
template_release_notes.write(release_notes_content.strip() + "\n")

if issue_messages:
add_contents_to_github_summary(
Expand Down

0 comments on commit b8df761

Please sign in to comment.