Skip to content
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

release instruction updated #53

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PyPI Builder and Releaser

on:
push:
tags:
- "v*.*.*"

jobs:
release:
name: Publishes release candidate to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build and publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
46 changes: 0 additions & 46 deletions .github/workflows/publish.yml

This file was deleted.

35 changes: 32 additions & 3 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,28 @@ The package version is mantained in `mambular/__version__.py` file. Increment th
## 3. Release
We use git flow for the package release.

- If you don't have git flow installed, you can follow the instructions [here](https://skoch.github.io/Git-Workflow/) to install it.
- Initialize git flow in the repository using the below command, if not already done.
- Use default options for the git flow initialization.

```sh
git flow init
```
- Start a new release using the below command. Replace `<version>` with the version number you want to release.
- The version number should be the same as the one you updated in the `__version__.py` file.
- The version number should be in the format `major.minor.patch`. For example, `v0.0.1`.
- The version number should be prefixed with a `v` as shown in the example. Otherwise, the pipeline to publish the package to PyPi will fail.

```sh
git flow release start <version>
git flow release start v0.0.1
```
- A new branch is created from the `develop` branch. This new branch is named according to the convention `release/<version>`. For example, if you run `git flow release start 1.0.0`, the new branch will be `release/1.0.0`.
- A new branch is created from the `develop` branch. This new branch is named according to the convention `release/<version>`. For example, if you run `git flow release start v0.0.1`, the new branch will be `release/v0.0.1`.
- The current working branch switches to the newly created release branch. This means any new commits will be added to the release branch, not the `develop` branch.
- This new branch is used to finalize the release. You can perform tasks such as version number bumps, documentation updates, and final testing.

Once you are satisfied with changes, use the below command to finish the release.
```sh
git flow release finish <version>
git flow release finish v0.0.1
```

- It will Merges the release branch into `main` (or `master`).
Expand All @@ -41,6 +53,23 @@ Finally, push the commits and tags to origin.
git push origin --tags
```

This will publish the tags to the remote repository.

Additionally, the latest documents are published as follows:
- A workflow is triggered from the `main` (or `master`) to publish the documentation via readthedocs.
- Documentation is published to readthedocs and can be accesseed at [mambular.readthedocs.io](https://mambular.readthedocs.io/en/latest/).


## 4. Publish package to PyPi

The package is published to PyPi using GitHub Actions. The workflow is triggered when a new tag is pushed to the repository. The workflow will build the package, upload it to PyPi.

## 5. GitHub Release

Create a new release on GitHub with the version number and release notes. The release notes should include the changes made in the release.






Expand Down
Loading