-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Add automatic release #11
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
feat: Add automatic release #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to reject this PR but found out that GH have scoped tokens now.
A few changes are needed:
- GITHUB_TOKEN is not a valid secret name. Can you change it to GH_TOKEN?
- Can you change it to deploy to test pypi first? And we change it to main pypi if everything works
Yep - that's what is nice about it, you're in full control and it can only affect this project.
Done
To be honest with you, I'm not sure how. python-semantic-release technically has an option for repository url - so potentially that? I didn't even know test.pypi existed |
Probably https://python-semantic-release.readthedocs.io/en/latest/configuration.html#repository |
F**k, lets yolo it |
haha, my kind of guy I think it may be failing because there is no current github release/ no previous "version" it sees in the commits? So it thinks it is 0.0.0 Try creating a tag and a release and see if that works. |
I added the tag and release and re ran it. No success |
They should be able to - I do something similar in another project. I think it needs https://python-semantic-release.readthedocs.io/en/latest/configuration.html#version-source to be tag so that it is looking at tags for the release version instead ofthe commits.
|
Lets try it. Create a PR with it and I'll approve it |
So - this is something I've done for a few other pypi projects, but I've never done it in the middle of the project like this. So it may take some testing/ tuning.
You'll have to get an access token for pypi https://test.pypi.org/help/#apitoken
and a github token. And allow actions permissions to write on the repository.
This will when you merge into main, automatically create a changelog, bump the version, put out a release on github, and then put out a pypi release.
We need a changelog for HA core.
It means we should tag our commits with chore: (something small, doesn't need a version bump)
fix: Fixes an existing bump, needs a small version bump
feat: A new feature
If you don't want to do this, that is fine, but we do need to create a changelog at some point for HA if nothing else.
I'd add this one before the other PR as I manually set the version to catch up with the last one.