Skip to content
Snippets Groups Projects
Commit a09fb8c4 authored by Etor Lucio Eceiza's avatar Etor Lucio Eceiza
Browse files

docs: add instructions for gitlab pypi release

parent e79f5193
No related branches found
No related tags found
No related merge requests found
Pipeline #103676 passed
......@@ -63,3 +63,59 @@ You can either use the cli in various ways:
## Support
If you need help submit an issue in the [gitlab repository](https://gitlab.dkrz.de/ch1187/rechunk-data/-/issues).
## Steps to Release a New Package to GitLab
### 1. Make sure all issues are resolved and committed
Nothing to do here if you're already done — just ensure your branch is up-to-date.
### 2. Bump the version number
1. Update your version number (e.g. in `src/rechunk_data/__init__.py`):
```python
__version__ = "2504.0.0" # Format: vYYMM.major.minor
```
2. Update the `CHANGELOG` with the feautures/fixes etc.
3. Then commit the change:
```shell
git add src/rechunk_data/__init__.py
git commit -m "Bump version to 2504.0.0"
```
### 3. Create and annotated tag:
```shell
git tag -a v2404.1.0 -m "Release v2504.0.0: Adds chunking options and size checks"
```
### 4. Push the tag and latest commits to GitLab
```shell
git push origin main # or your branch
git push origin v2504.0.0
```
### 5. Build the package
```shell
python -m pip install build
python -m build
```
It will create a `./dist/` folder with a `.whl` and `.tar.gz`.
### 6. Upload to GitLab's PyPI registry
Install Twine if needed:
```shell
python -m pip install twine
```
Then upload (replace <USERNAME> and <TOKEN> with your GitLab credentials):
```shell
twine upload --repository-url https://gitlab.dkrz.de/api/v4/projects/<project_id>/packages/pypi dist/* \
-u <USERNAME> -p <GITLAB_PERSONAL_ACCESS_TOKEN>
```
To find your <project_id>, check your GitLab repo URL like:
```bash
https://gitlab.dkrz.de/api/v4/projects/<project_id>
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment