Skip to content

Commit b720ff0

Browse files
committed
Add docs on how to release package and container image
1 parent 9f8de82 commit b720ff0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,44 @@ uv run click-man cve
320320
uv run tox -e manpages
321321
```
322322

323+
## Releasing
324+
325+
1. Make version bump release commit
326+
([example](https://github.com/RedHatProductSecurity/cvelib/commit/0e188b48b61a3659d1e923c08e4f980c034bf445))
327+
that also refreshes all man pages and updates any compatibility statements in the README file. Merge the PR to master.
328+
2. Remove previously built packages and build new ones:
329+
```shell
330+
$ rm dist/*
331+
$ uv build
332+
$ ls dist/ # You should see two artifacts in this directory afterwards, e.g.:
333+
cvelib-0.6.0-py3-none-any.whl cvelib-0.6.0.tar.gz
334+
```
335+
3. Publish package to PyPI test:
336+
```shell
337+
uv publish --publish-url https://test.pypi.org/legacy/`
338+
```
339+
4. Test that installation and basic functionality work:
340+
```shell
341+
uv run --no-cache --with cvelib --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cve -h
342+
```
343+
Replace `cve -h` with other commands to test other functionality.
344+
5. Publish package to PyPI:
345+
```shell
346+
uv publish
347+
```
348+
6. Tag the version bump commit as 'x.y.z' and push to master:
349+
```shell
350+
git tag 1.8.0
351+
git push --tags
352+
```
353+
This triggers a new container image build in Quay.io: https://quay.io/repository/prodsecdev/cvelib?tab=builds.
354+
7. When the container image build completes, move the _latest_ tag to point to new release:
355+
https://quay.io/repository/prodsecdev/cvelib?tab=tags
356+
(click cog icon next to new version) -> Add new tag -> latest -> Move tag)
357+
8. Create a release in GitHub manually against the newly pushed tag:
358+
https://github.com/RedHatProductSecurity/cvelib/releases. Use the template from a previous release and add a list of
359+
changes from the changelog.
360+
323361
---
324362

325363
[CVE](https://cve.org) is a registered trademark of [The MITRE Corporation](https://www.mitre.org).

0 commit comments

Comments
 (0)