Skip to content

Finish Release Workflow#1547

Merged
kingthorin merged 2 commits intodatafaker-net:mainfrom
kingthorin:wf-tweak
Apr 18, 2025
Merged

Finish Release Workflow#1547
kingthorin merged 2 commits intodatafaker-net:mainfrom
kingthorin:wf-tweak

Conversation

@kingthorin
Copy link
Copy Markdown
Collaborator

  • Have the pom update workflow trigger when the release has completed. (Instead of being called, since a called workflow can't have greater permissions than the caller.)
  • Also update the versions in README.md.

Fixes #1488

Tested in this junk repo: https://github.com/kingthorin/dftest (which will be removed after this PR is merged).

- Have the pom update workflow trigger when the release has completed.
(Instead of being called, since a called workflow can't have greater
permissions than the caller.)
- Also update the versions in README.md.

Signed-off-by: kingthorin <[email protected]>
Comment on lines +32 to +33
# Replace version in README.md look for >, :, ` (greater than, colon, backtick) followed by 2 period number period number and replace it with the leading char and new version
sed -i -E 's/([\>`\:]{1})2\.[0-9]\.[0-9]/\1'"$VERS"'/g' README.md
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm happy to hear suggestions on a better way to handle this. There are other version identifiers in the README but the three we currently care about fulfill this specific prefix condition.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.40%. Comparing base (967e6cf) to head (7082c47).
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1547      +/-   ##
============================================
- Coverage     92.49%   92.40%   -0.10%     
+ Complexity     3290     3286       -4     
============================================
  Files           326      326              
  Lines          6474     6474              
  Branches        630      630              
============================================
- Hits           5988     5982       -6     
- Misses          336      338       +2     
- Partials        150      154       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kingthorin
Copy link
Copy Markdown
Collaborator Author

kingthorin commented Apr 17, 2025

Summary and Review provided by Claude 3.7 via copilot

Summary

This pull request addresses issues with the release workflow in the datafaker-net/datafaker repository and fixes issue #1488 titled “Creating a new release doesn’t create a new release.” The PR was submitted by kingthorin (who is also you, as the current user).

Changes Made:

Changed how the pom update workflow is triggered:

Modified .github/workflows/pom_update.yml to trigger automatically when a release workflow completes

Changed from using workflow_call (requiring explicit calling) to workflow_run (event-based triggering)

This allows the workflow to have its own permissions rather than inheriting from the caller

Added README version updating:

Added script to extract the current version from pom.xml

Added a sed command to update version references in README.md

This ensures documentation stays in sync with actual releases

Removed redundant workflow call:

Removed the explicit call to pom_update workflow from the release-from-tag.yml file

This is no longer needed since the workflow now triggers automatically

Stats:

Added 9 lines

Deleted 5 lines

Changed 2 files

Single commit

Review

Strengths:

Improves automation: The PR enhances the automation of the release process by making the pom update workflow trigger automatically upon release completion.

Fixes permissions issue: Addresses a permissions limitation where called workflows can’t have greater permissions than the caller.

Enhances documentation synchronization: Ensures README.md version references stay up-to-date with actual releases.

Well-tested: The PR author mentions testing these changes in a test repository before submitting.

Clean implementation: The changes are minimal and focused on addressing the specific issue.

Considerations:

The sed command for updating README.md is quite specific, targeting version patterns that start with “>”, “:”, or “`” followed by version numbers. If version numbers appear in other contexts in the README, they may not get updated.

The PR includes hard-coded reference to version “2” in the sed pattern. If major version ever changes, this would need updating.

Verdict:

This PR appears to be a well-tested, focused improvement to the release workflow that addresses the issues raised in #1488. It improves automation, permissions handling, and documentation synchronization with minimal changes to the codebase. The implementation appears solid and properly tested.

Copy link
Copy Markdown
Contributor

@bodiam bodiam left a comment

Choose a reason for hiding this comment

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

Happy to give this a shot!

@kingthorin kingthorin merged commit 3ca30f2 into datafaker-net:main Apr 18, 2025
13 checks passed
@kingthorin kingthorin deleted the wf-tweak branch April 18, 2025 04:44
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.

Creating a new release doesn't create a new release.

3 participants