Implement RFC #76: amaranth-boards versioning policy.#263
Implement RFC #76: amaranth-boards versioning policy.#263whitequark merged 8 commits intoamaranth-lang:mainfrom
amaranth-boards versioning policy.#263Conversation
|
Thanks! Let's see it work... |
|
Darn - the permissions issue it fails with matches something I ran into during testing on my forked repo. I had to enable read/write permissions on the repo from within the GitHub Actions settings (Settings -> Actions -> General -> Workflow Permissions). There might be a more granular way to enable that from within the YAML, but I'd have to go digging as GitHub Actions permissions are still a bit of a mystery to me... |
|
Actually - upon further inspection it looks like it's failing to find an existing tag to increment. Perhaps tagging a commit behind d1133be as |
|
Pushed the tag! |
|
This seems to have succeeded: https://github.com/amaranth-lang/amaranth-boards/actions/runs/22084202136/job/63815701838 ... but there's no actual release?? https://pypi.org/project/amaranth-boards/0/#history |
|
It seems to exist in PyPI if you click the Download Files button - there's a .whl in there that was updated a few minutes ago. But perhaps it considers versions |
|
Oh, makes sense. |
|
I've pushed an empty commit to |
|
I haven't the faintest clue what this means: https://github.com/amaranth-lang/amaranth-boards/actions/runs/22084613447/job/63816964770#step:7:126 |
|
I suppose we could retry with Sorry that this is being a bit of a pain, the effort's much appreciated! |
|
I think this might be due to moving the tagging step to after the build and metadata check. Since the tag hasn't been made at the time of build, PDM thinks that the build is dirty and names it appropriately, causing twine to reject it during the upload. We could definitely build twice but that seems wasteful - how about we make the tag first, and then only push the tag if the metadata check succeeds (or even after the PyPI release succeeds)? I can definitely type up another PR with that change if you'd like. |
This seems reasonable yeah. |
|
Just pushed the change here: |
|
Pushed to main! |
|
Looks like that pushed to TestPyPI successfully! It did skip pushing to production PyPI and making the release on GitHub, which should be fixed in the commit below: Sorry again for all the trouble! |
|
Thanks for the pull! It looks like it's now failing the release to PyPI with: I'm guessing this is because the release to TestPyPI also generated these attestations, and didn't clean them up afterwards. I see a few options, we could:
Any thoughts on what direction to take? |
If we're going to release to PyPI on every commit I don't really see any point in bothering with Test PyPI. |
|
Sounds good to me - we should be good to just comment out that step in the |
|
I'm actually quite happy to do cherry-picks as I've been doing mostly other stuff in parallel. |
|
This is definitely broken... |
|
Indeed - perhaps we delete that release once the CI is stable. I did toss another commit down that should fix that - it exports the version during tag creation, and then uses it later on when making the release. |
|
Done! |
|
That seems to have worked! PyPI looks good, as do the tags and releases on GitHub. I think we can declare victory! |
|
🎉 Thanks for your effort in making this happen, it is very much appreciated! |

This PR implements RFC 73 and adds a versioning policy to
amaranth-boards. A few quick notes about this PR:The package and release steps are borrowed from the main repo's CI configuration, and I've thrown in a bash step that will automatically tag the HEAD before generating the Python package.
The tagging logic will throw an error if there's no existing tags in the repository. As a result, we may need a
v0.0.0tag to be made on HEAD before this PR is merged - that'd makev0.0.1be the first release published to PyPI.I made a few commits in my fork to convince myself (and maintainers!) that the tagging logic was working correctly, but these extra commits needn't make their way upstream. Let's definitely squash these commits before merging. Unfortunately I wasn't able to test that the pushes to PyPI and releases to GitHub work, but since that part of the workflow is the same as what's on the main repo it seems low-risk.