Skip to content

Commit

Permalink
Merge pull request #215 from pybop-team/157-add-release_workflowmd
Browse files Browse the repository at this point in the history
Update release workflow
  • Loading branch information
BradyPlanden committed Feb 23, 2024
2 parents c482583 + 1d9e190 commit 188ebb4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Release Workflow

This document outlines the release workflow for publishing to PyPI and TestPyPI using GitHub Actions.

## Creating a New Release

To create a new release, follow these steps:

1. **Prepare the Release:**
- Create a new branch for the release (i.e. `v24.XX`) from `develop`.
- Increment the following;
- The version number in the `pyproject.toml` file following CalVer versioning.
- The`CHANGELOG.md` version with the changes for the new version.
- Open a PR to the `main` branch. Once the PR is merged, proceed to the next step.

2. **Tag the Release:**
- Create a new Git tag for the release. For a full release, use a tag like `v24.2`. For a release candidate, use a tag like `v24.2rc.1`.
- Push the tag to the remote repository: `git push origin <tag_name>`.

3. **Create a GitHub Release:**
- Go to the "Releases" section of on GitHub.
- Click "Draft a new release."
- Enter the tag you created in the "Tag version" field.
- Fill in the release title and description. Add any major changes and link to the `CHANGELOG.md` for a list of total changes.
- If it's a pre-release (release candidate), check the "This is a pre-release" checkbox.
- Click "Publish release" to create the release.

4. **Monitor the Workflow:**
- Go to the "Actions" tab of your repository to monitor the workflow's progress.
- The workflow will build the distribution packages and then publish them to PyPI or TestPyPI, depending on whether the release is a full release or a pre-release.

5. **Verify the Release:**
- Check PyPI or TestPyPI to ensure that your package is available and has been updated to the new version.
- Test installing the package using `pip` to ensure everything works as expected.
11 changes: 5 additions & 6 deletions .github/workflows/release_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.12"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
Expand All @@ -35,9 +35,8 @@ jobs:
Publish Python 🐍 distribution 📦 to PyPI
if: >
startsWith(github.ref, 'refs/tags/') &&
!contains(github.ref, 'rc')
needs:
- build
!contains(github.ref, 'rc') && github.repository == github.event.repository
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
Expand Down Expand Up @@ -91,7 +90,7 @@ jobs:
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: contains(github.ref, 'rc') # only publish to TestPyPI for rc tags
if: contains(github.ref, 'rc') && github.repository == github.event.repository # only publish to TestPyPI for rc tags
needs:
- build
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#215](https://github.com/pybop-team/PyBOP/pull/215) - Adds `release_workflow.md` and updates `release_action.yaml`
- [#204](https://github.com/pybop-team/PyBOP/pull/204) - Splits integration, unit, examples, plots tests, update workflows. Adds pytest `--examples`, `--integration`, `--plots` args. Adds tests for coverage after removal of examples. Adds examples and integrations nox sessions. Adds `pybop.RMSE._evaluateS1()` method
- [#206](https://github.com/pybop-team/PyBOP/pull/206) - Adds Python 3.12 support with corresponding github actions changes.
- [#18](https://github.com/pybop-team/PyBOP/pull/18) - Adds geometric parameter fitting capability, via `model.rebuild()` with `model.rebuild_parameters`.
Expand Down

0 comments on commit 188ebb4

Please sign in to comment.