- In `CHANGELOG.md`, move entry for current version to the `Older versions` section and add one for the new version.
- `git add .` and `git commit -m "Add link to changelog of new major version"`
- In `.github/workflows/test-*.yml`, add `6.*` to the `branches` sections and remove the oldest branch from them (e.g. `4.*`).
- `git add .` and `git commit -m "CI: Update workflows to run in new stable branch [ci skip]"`
* For the first alpha of a new major version (e.g 7.0.0a1):
- Add a new file called `changelogs/Spyder-X+1.md` to the tree (e.g. `changelogs/Spyder-7.md`).
- Add `changelogs/Spyder-X+1.md` to `MANIFEST.in`, remove `changelogs/Spyder-X.md` from it and add that path to the `check-manifest/ignore` section of `setup.cfg`.
* Update `changelogs/Spyder-X.md` (`changelogs/Spyder-6.md` for Spyder 6 for example) with `loghub spyder-ide/spyder -m vX.X.X`
* Add sections for `New features`, `Important fixes` and `New API features` in `changelogs/Spyder-X.md`. For this take a look at closed issues and PRs for the current milestone.
* `git add .` and `git commit -m "Update Changelog"`
* Update [Announcements.md](Announcements.md) (this goes to our Google group) removing the outdated announcement of the same kind (major, minor, or beta/release candidate)
* `git add .` and `git commit -m "Update Announcements"`
* Update [org.spyder_ide.spyder.appdata.xml](scripts/org.spyder_ide.spyder.appdata.xml) adding the version to be released over the `<releases>` tag
* `git add .` and `git commit -m "Update metadata files"`
* Once merged, backport the PR that contains these changes to the stable branch (e.g. `6.x`)
To do the PyPI release and version tag
* Close the current milestone on Github
* git pull or git fetch/merge the respective branch that will be released (e.g `6.x` - stable branch or `master` - alphas/betas/rcs of a new minor/major version).
* For a new major release (e.g. version 6.0.0 after 5.5.6):
- `git checkout -b 6.x`
- `git checkout master`
- Update version in `__init__.py` to reflect next minor version as dev version (i.e `6.1.0a1.dev0`).
- `git add .` and `git commit -m "Bump version to new minor version"`
- `git checkout 6.x`
* Update version in `__init__.py` (Remove '{a/b/rc}X' and 'dev0' for stable versions; or remove 'dev0' for pre-releases)
* `git add .` and `git commit -m "Release X.X.X"`
* `git clean -xfdi` and select option `1`
* `python setup.py sdist`
*Note*: This needs to be done on a Linux machine to prevent getting permission errors on executable files (see [21892](https://github.com/spyder-ide/spyder/issues/21892) and [#14494](https://github.com/spyder-ide/spyder/issues/14494)).
* Activate environment with pip packages only
* `pip install -U pip setuptools twine wheel`
* `python setup.py bdist_wheel`
*Note*: This needs to be done on a Linux machine to prevent getting permission errors in executable files (see [21892](https://github.com/spyder-ide/spyder/issues/21892) and [#14494](https://github.com/spyder-ide/spyder/issues/14494)).
* Install generated wheel locally and check for errors
* `twine check --strict dist/*`
* `twine upload dist/*`
* Check in PyPI that the new release was published correctly
* `git tag -a vX.X.X -m "Release X.X.X"`
* Update version in `__init__.py`:
- Add 'a1', 'dev0' and increment patch version for final version releases
- Add 'dev0' and increment alpha/beta/rc version for pre-releases
* `git add .` and `git commit -m "Back to work [ci skip]"`
* Push changes and new tag to the corresponding branches. When doing a stable release from `6.x`, for example, you could push changes with
git push upstream 6.x
git push upstream --tags
After the PyPI release
* Merge PR on Conda-forge for Spyder. For that you can go to the [spyder-feedstock repo](https://github.com/conda-forge/spyder-feedstock) and merge the corresponding PR for the new release (usually an automatic PR will appear that can be either merged as it is or be use as boilerplate).
**Notes**:
- Don't forget to add new dependencies and update constraints on the rest of them. For that, you need to compare line by line the contents of the `recipe/meta.yaml` file in the feedstock with [setup.py](https://github.com/spyder-ide/spyder/blob/master/setup.py)
* Update Binder related elements when the new Spyder version is available in Conda-forge:
- Update the Spyder version on the environment file ([`binder/environment.yml`](https://github.com/spyder-ide/binder-environments/blob/spyder-stable/binder/environment.yml)) of the ([`spyder-stable` branch](https://github.com/spyder-ide/binder-environments/tree/spyder-stable)) in the `binder-environments` repo.
- Update `environment.yml` files of the [`master`](https://github.com/spyder-ide/binder-environments/blob/master/binder/environment.yml) branch of `binder-environments` with the contents of the `binder/environment.yml` file present on this repo.
- Update `environment.yml` files of the [`6.x`](https://github.com/spyder-ide/binder-environments/blob/6.x/binder/environment.yml) branches of `binder-environments` with the contents of the `binder/environment.yml` file present on this repo.
* Publish release in our [Github Releases page](https://github.com/spyder-ide/spyder/releases):
- Copy the contents of the previous release description (updating the relevant information and links to point to the new Spyder version and changelog entry).
- Edit the previous release description to only have the changelog line.
* Publish release announcement to our [list](https://groups.google.com/group/spyderlib) (following [Announcements.md](Announcements.md)) after the installers have been built.