summaryrefslogtreecommitdiffstats
path: root/.github/release.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-28 06:11:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-28 06:11:39 +0000
commit1fd6a618b60d7168fd8f37585d5d39d22d775afd (patch)
treefbc6d0c213b8acdd0a31deafe5c5fc0d05a3a312 /.github/release.md
parentInitial commit. (diff)
downloadanta-1fd6a618b60d7168fd8f37585d5d39d22d775afd.tar.xz
anta-1fd6a618b60d7168fd8f37585d5d39d22d775afd.zip
Adding upstream version 0.13.0.upstream/0.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/release.md')
-rw-r--r--.github/release.md103
1 files changed, 103 insertions, 0 deletions
diff --git a/.github/release.md b/.github/release.md
new file mode 100644
index 0000000..15db226
--- /dev/null
+++ b/.github/release.md
@@ -0,0 +1,103 @@
+# Notes
+
+Notes regarding how to release anta package
+
+## Package requirements
+
+- `bumpver`
+- `build`
+- `twine`
+
+Also, [Github CLI](https://cli.github.com/) can be helpful and is recommended
+
+## Bumping version
+
+In a branch specific for this, use the `bumpver` tool.
+It is configured to update:
+* pyproject.toml
+* docs/contribution.md
+* docs/requirements-and-installation.md
+
+For instance to bump a patch version:
+```
+bumpver update --patch
+```
+
+and for a minor version
+
+```
+bumpver update --minor
+```
+
+Tip: It is possible to check what the changes would be using `--dry`
+
+```
+bumpver update --minor --dry
+```
+
+## Creating release on Github
+
+Create the release on Github with the appropriate tag `vx.x.x`
+
+## Release version `x.x.x`
+
+> [!IMPORTANT]
+> TODO - make this a github workflow
+
+`x.x.x` is the version to be released
+
+This is to be executed at the top of the repo
+
+1. Checkout the latest version of `main` with the correct tag for the release
+2. Create a new branch for release
+
+ ```bash
+ git switch -c rel/vx.x.x
+ ```
+3. [Optional] Clean dist if required
+4. Build the package locally
+
+ ```bash
+ python -m build
+ ```
+5. Check the package with `twine` (replace with your vesion)
+
+ ```bash
+ twine check dist/*
+ ```
+6. Upload the package to test.pypi
+
+ ```bash
+ twine upload -r testpypi dist/anta-x.x.x.*
+ ```
+7. Verify the package by installing it in a local venv and checking it installs
+ and run correctly (run the tests)
+
+ ```bash
+ # In a brand new venv
+ pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --no-cache anta
+ ```
+8. Push to anta repository and create a Pull Request
+
+ ```bash
+ git push origin HEAD
+ gh pr create --title 'bump: ANTA vx.x.x'
+ ```
+9. Merge PR after review and wait for [workflow](https://github.com/arista-netdevops-community/anta/actions/workflows/release.yml) to be executed.
+
+ ```bash
+ gh pr merge --squash
+ ```
+
+10. Like 7 but for normal pypi
+
+ ```bash
+ # In a brand new venv
+ pip install anta
+ ```
+
+11. Test installed version
+
+ ```bash
+ anta --version
+ ``` \ No newline at end of file