Skip to content

Commit

Permalink
Merge from 1.x: PR #293
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Dec 3, 2021
2 parents 8285eca + e8e5b24 commit 8f961ff
Showing 1 changed file with 77 additions and 21 deletions.
98 changes: 77 additions & 21 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,114 @@
# Release Procedure

In the commands below, replace `X.Y.Z` with the release version when needed.

**Note**: We use `pip` instead of `conda` here even on Conda installs, to ensure we always get the latest upstream versions of the build dependencies.


## PyPI

To release a new version of QtPy on PyPI:


## Prepare
### Prepare

* Close Github milestone and ensure all issues are resolved/moved
* Close [GitHub milestone](https://github.com/spyder-ide/qtpy/milestones) and ensure all issues are resolved/moved

* `git switch master && git pull upstream master` (assuming `master` is the release branch)
* Update local repo

* Check `MANIFEST.in` and `setup.cfg` to ensure they are up to date
```bash
git restore . && git switch master && git pull upstream master
```

* Clean local repo

## Commit
```bash
git clean -xfdi
```

* `pip install --upgrade loghub`

* Update `CHANGELOG.md` using `loghub` to generate the list of issues and PRs merged to add at the top of the file:
### Commit

* Install/upgrade Loghub

```bash
pip install --upgrade loghub
```

* Update `CHANGELOG.md` using Loghub to generate the list of issues and PRs merged to add at the top of the file

```bash
loghub -m vX.Y.Z spyder-ide/qtpy
```

* Update `__version__` in `__init__.py` (set release version, remove `.dev0`)

* `git commit -am 'Release X.Y.Z'`
* Create release commit

```bash
git commit -am "Release X.Y.Z"
```

## Build

**Note**: We use `pip` instead of `conda` here even on Conda installs, to ensure we always get the latest upstream versions of the build dependencies.
### Build

* `git clean -xfdi`
* Update the packaging stack

* `python -m pip install --upgrade-strategy eager --upgrade build pip setuptools twine wheel`
```bash
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager build setuptools twine wheel
```

* `python -bb -X dev -W error -m build`
* Build source distribution and wheel

```bash
python -bb -X dev -W error -m build
```

## Upload
* Check distribution archives

* `twine check --strict dist/*`
```bash
twine check --strict dist/*
```


### Release

* Upload distribution packages to PyPI

* `twine upload dist/*`
```bash
twine upload dist/*
```

* Create release tag

* `git tag -a vX.Y.Z -m 'Release X.Y.Z'`
```bash
git tag -a vX.Y.Z -m "Release X.Y.Z"
```


## Cleanup
### Finalize

* Update `__version__` in `__init__.py` (add `.dev0` and increment minor)

* `git commit -am 'Back to work'`
* Create `Back to work` commit

```bash
git commit -am "Back to work"
```

* Push new release commits and tags to `master`

```bash
git push upstream master --follow-tags
```

* Create a [GitHub release](https://github.com/spyder-ide/qtpy/releases) from the tag


## Conda-Forge

* `git push upstream --follow-tags`
To release a new version of QtPy on Conda-Forge:

* Create a GitHub release from the tag
* After the release on PyPI, an automatic PR in the [Conda-Forge feedstock repo for QtPy](https://github.com/conda-forge/qtpy-feedstock/pulls) should open.
Merging this PR will update the respective Conda-Forge package.

0 comments on commit 8f961ff

Please sign in to comment.