-
Notifications
You must be signed in to change notification settings - Fork 77
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
Automated release #665
Automated release #665
Conversation
@benthomasson Would this get published to PyPi at the end? |
Yes, we probably should. I'll do that in another PR. |
1914528
to
8370239
Compare
@benthomasson Would switching from semver to calver have issues if there are users using versions in their requirements.txt files or Dockerfiles? |
8370239
to
2902c34
Compare
The calver will be greater than semver, so going that way won't be a problem. |
a3fb312
to
67a4285
Compare
@benthomasson Should the release document that we are switching to CalVer? |
The main goal of this automation is the automatic publication of the package in pypi. That step would be even more complicated with this pipeline, because with the current manual procedure we can generate the artifacts and publish them in pypi with the same command but now we should download the artifacts generated by this pipeline and publish them manually. I recommend to add that step before merge. |
bd1d1a0
to
f48b5a2
Compare
We should not be building any released binary locally. It is very easy to slip in development files into a release build without realizing it if it is built locally. |
The local build/publish is already handled by make: https://github.com/ansible/ansible-rulebook/blob/main/Makefile#L80 My point is that the publication on pypi is the main goal of an automated release process. Users usually won't consume the artifacts from github, they will run With the current process you only have to run make. Now, with this pipeline as it is now, I should have to go to github, download the artifacts generated and publish them in pypi, which is a more tedious process than That's why I'm requesting to automate also the publication on pypi. |
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.
As it is now, the release could be done accidentally with the code of any branch. I think it would be good to ensure that only can be executed from the expected branches.
|
||
jobs: | ||
stage: | ||
runs-on: ubuntu-latest |
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.
Can you add if: github.repository == 'ansible/ansible-rulebook'
to make clear this workflow is not intended to be executed by forks?
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.
It doesn't work on forks because it doesn't have permissions to push to this repo.
I think calver doesn't meet our requirements. We have to maintain multiple versions right now are two: Eventually we will have to maintain more versions. The calver itself doesn't tell you what is the branch. Everytime you need to check the releases for a given supported version you would have to inspect the tags per branch. If a user wants the latest release of 1.0, we are forcing him to figure out first what is the tag and we prevent him to set rules like (<=1.0.*) |
This is a valid concern. I am debating this myself. With semver we need to be able to bump the patch number every week to do automated weekly releases. That might make the patch number meaningless. https://semver.org/spec/v2.0.0.html. Semver 2.0 does support release candidates so that should be easier to automate. |
b6600db
to
e7ac2f1
Compare
2d23c17
to
1589a54
Compare
3043a01
to
a2afe48
Compare
I am closing this in favor of #667 |
This PR creates an automated release process using github actions and an ansible rulebook.
This can also be run locally using this command:
An example release is here: https://github.com/ansible/ansible-rulebook/releases/tag/2024.2.22