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

Version number action #340

Merged
merged 15 commits into from
Dec 12, 2024
Merged

Version number action #340

merged 15 commits into from
Dec 12, 2024

Conversation

ajjackson
Copy link
Collaborator

Developing a github action that sets the version number in all the relevant places, for use in the release process.

This is part of #326

@ajjackson
Copy link
Collaborator Author

This looks good now, we have successful runs when only the tag is updated
https://github.com/pace-neutrons/Euphonic/actions/runs/12284726381

and when both tag and files are updated
https://github.com/pace-neutrons/Euphonic/actions/runs/12284756168

And the tags are showing up in the list of repository tags. (I suppose they should be removed as these are not really official release candidates? But not much harm done if no release packages are made from them.)

ajjackson and others added 6 commits December 11, 2024 21:08
Sometimes we might run this when the version number is already
correct; e.g. when cleaning up from a failed release attempt.

In that case, skip the commit and apply the tag to the existing last
commit.
Copy link
Contributor

github-actions bot commented Dec 11, 2024

Test Results

    31 files  +    4      31 suites  +4   2h 37m 28s ⏱️ + 1h 1m 23s
 1 066 tests ±    0   1 060 ✅ ±    0   6 💤 ± 0  0 ❌ ±0 
15 900 runs  +2 418  15 806 ✅ +2 396  94 💤 +22  0 ❌ ±0 

Results for commit d9dc0fb. ± Comparison against base commit f261a9d.

♻️ This comment has been updated with latest results.

@ajjackson
Copy link
Collaborator Author

Wheel/package builds are here and got the version number wrong 😭

https://github.com/pace-neutrons/Euphonic/actions/runs/12284927698

@ajjackson
Copy link
Collaborator Author

Ah, I see part of the problem: while rebasing I moved this history away from the tagged commits. That explains why it is seeing v1.4.0 tags 😅

@ajjackson
Copy link
Collaborator Author

Ok, with a new tag the build names all look good again.

I'd like to add a step that validates the version number format and adds a "v" if missing.

@ajjackson
Copy link
Collaborator Author

It seems to work! If I try to tag with "bad-version-tag" the run fails quickly:

Screenshot 2024-12-12 at 09 49 03

Whereas a slightly inconsistent format "1.4.1-rc1" gets reformatted to "v1.4.1rc1"
and this version is used for files and tag:

Screenshot 2024-12-12 at 09 59 06

@ajjackson ajjackson marked this pull request as ready for review December 12, 2024 10:00
@ajjackson ajjackson added this to the v1.4.1 milestone Dec 12, 2024
@ajjackson
Copy link
Collaborator Author

Unit tests are running here, not clear why they don't show up in the checklist.
https://github.com/pace-neutrons/Euphonic/actions/runs/12294025878

@ajjackson ajjackson merged commit 93bde7b into master Dec 12, 2024
2 checks passed
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.

1 participant