Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1-step release action #366

Closed
wants to merge 9 commits into from
Closed

1-step release action #366

wants to merge 9 commits into from

Conversation

ajjackson
Copy link
Collaborator

Closes #326

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Test Results

   16 files   -     2     16 suites   - 2   51m 18s ⏱️ - 7m 25s
1 081 tests ±    0  1 075 ✅ ±    0   6 💤 ± 0  0 ❌ ±0 
9 207 runs   - 1 267  9 160 ✅  - 1 256  47 💤  - 11  0 ❌ ±0 

Results for commit 08c69c5. ± Comparison against base commit 1d9874a.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.99%. Comparing base (1a92d14) to head (08c69c5).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #366      +/-   ##
==========================================
- Coverage   96.03%   95.99%   -0.04%     
==========================================
  Files          31       31              
  Lines        4211     4396     +185     
  Branches      642      668      +26     
==========================================
+ Hits         4044     4220     +176     
- Misses         95       99       +4     
- Partials       72       77       +5     

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

Now this script can be used in the following ways:

- without "--replace" argument the new CHANGELOG is printed to stdout
- If there is Unreleased content and the requested tag already exists
  right after Unreleased, we assume that a failed release is being
  fixed. Content from Unreleased is moved into that section and appended
  to what is already there.
- If the tags match but there are no Unreleased changelog notes,
  nothing much should change. (Maybe some line breaks.)
  This might be the case if we are on a release branch and already
  manually updated the CHANGELOG.
- Otherwise, we create a new release section under Unreleased, move
  content from Unreleased into that section, and update the "compare"
  links.

While working on the parser I ran into a broken link and some
inconsistent spacing in the existing CHANGELOG.rst file.
This could be done in a _slightly_ more modular fashion but would add
a bit of complexity as well to pass around the file changes across
actions without making multiple commits in the history.

The nice thing about this setup is that bump_changelog.py doesn't mind
at all if you already sorted out the CHANGELOG by hand, so if there
are any difficult/edge cases they can be handled by using a release
branch and running the script locally before using the release action.
itertools.batched is from Python 3.12. Not a complete dealbreaker, but
makes life simpler as developers are likely running the script from a
Euphonic dev environment which is 3.10 with toolz available.
@ajjackson
Copy link
Collaborator Author

Move to #368 to avoid annoying duplicate test triggers due to "release" branch name.

@ajjackson ajjackson closed this Feb 9, 2025
@ajjackson ajjackson deleted the 326-release-action branch February 10, 2025 11:26
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.

Create a release Workflow that integrates version-numbering and runs tests before pushing
1 participant