vsketch
vsketch copied to clipboard
Automatic build, release, and publish (closes #151)
Description
Build, publish, and release automatically with GitHub Actions. Will not publish (but also won't error) unless PYPI_API_TOKEN
secret is set. It will build and test installability every time, but it will only create a GitHub release and push to Pypi on tag pushes.
I also attempted to add setuptools_scm
, but Poetry does not support it.
Closes #151
Checklist
- [x] feature/fix implemented
- [ ]
mypy
returns no error - [ ] tests added/updated and
pytest --runslow
succeeds - [ ] documentation added/updated and building with no error (
make clean && make html
indocs/
) - [ ] examples added/updated
- [ ] code formatting ok (
black
andisort
)
If I'm not mistaken, this project using poetry, quite a few of those steps could be simplified using poetry build
right. That's what I used for vpype at least.
Which steps specifically? Effectively all this does for the wheel and sdist is:
- Checkout branch
- Install the pip build tool
- Build. This is done with pip because that is what pip would do when running
pip install vsketch
on the user end. The settings inpyproject.toml
cause it download poetry and use it as the build backend. I don't think using poetry would necessarily save any steps. - Show a SHA256 signature of the files for verification
- Upload the artifacts
It does the additional step of testing that the sdist is actually installable through pip after generating it on all three platforms. I then use a GitHub release action and the official Pypi action to upload to Pypi.
You can see an example tag build here: https://github.com/DaAwesomeP/vsketch/actions/runs/1243632046
just wanted to restart the discussion. Is there anything else that can be done?
Yes, I need to take the time to look into it. I might actually go for a slightly simpler setup similar to what I use for my vpype plug-ins.
That said, this discord conversation makes me question if it's actually a good idea to package/release vsketch.Vsketch
and vsk
together...