Skip to content

Commit

Permalink
Update release process in template post v0.3.0 (#907)
Browse files Browse the repository at this point in the history
Documenting some of the lessons learned from
Release v0.3.0 so that the next one will be smoother.
The Release Drafter bot will also automatically
increment to the next minor version (instead of a patch version)
when a PR tagged 'feature' is merged into the master branch.

Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
  • Loading branch information
weiji14 and seisman committed Mar 1, 2021
1 parent 2d0ffcd commit b6050c9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 32 deletions.
25 changes: 18 additions & 7 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
---
name: PyGMT release checklist
about: Checklist for a new PyGMT release.
title: Release PyGMT x.x.x
title: Release PyGMT vX.Y.Z
labels: maintenance
assignees: ''

---

**Release**: [v0.x.x](https://github.com/GenericMappingTools/pygmt/milestones/0.x.x)
**Release**: [v0.x.x](https://github.com/GenericMappingTools/pygmt/milestones/?)
**Scheduled Date**: YYYY/MM/DD
**Pull request due date**: YYYY/MM/DD

**Priority PRs/issues to complete prior to release**
- [ ] Wrap X ()
- [ ] Wrap Y ()

**Before release**:
- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version"
- [ ] Update Changelog
- [ ] Add a new entry in `doc/_static/version_switch.js` for documentation switcher
- [ ] Update citation information https://github.com/GenericMappingTools/pygmt#citing-pygmt
- [ ] Finish up 'Changelog entry for v0.x.x' Pull Request:
- [ ] Add a new entry in `doc/_static/version_switch.js` for documentation switcher
- [ ] Update citation information https://github.com/GenericMappingTools/pygmt#citing-pygmt
- [ ] Add the documentation link https://github.com/GenericMappingTools/pygmt#documentation-for-other-versions
- [ ] Add compatibility information https://github.com/GenericMappingTools/pygmt#compatibility-with-python-and-gmt-versions
- [ ] Copy draft changelog from Release Drafter and edit it to look nice

**Release**:
- [ ] Go to [GitHub Release](https://github.com/GenericMappingTools/pygmt/releases) and make a release, this will automatically create a tag too
- [ ] Manually upload the pygmt-vX.Y.Z.zip file to https://zenodo.org/deposit, make sure you file it under the correct reserved DOI
- [ ] At the [PyGMT release page on GitHub](https://github.com/GenericMappingTools/pygmt/releases):
- [ ] Edit the draft release notes with the finalized changelog
- [ ] Set the tag version and release title to vX.Y.Z
- [ ] Make a release by clicking the 'Publish Release' button, this will automatically create a tag too
- [ ] Manually upload the pygmt-vX.Y.Z.zip file to https://zenodo.org/deposit, ensure that it is filed under the correct reserved DOI

**After release**:
- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Usually done automatically by conda-forge's bot]
Expand Down
9 changes: 7 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
version-resolver:
minor:
labels:
- 'feature'
default: patch
categories:
- title: 'New Features'
label: 'feature'
Expand Down
43 changes: 20 additions & 23 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ There are 8 configuration files located in `.github/workflows`:
Archives will be pushed to TestPyPI on every commit to the *master* branch
and tagged releases, and to PyPI for tagged releases only.

6. `release-drafer.yml` (Drafts the next release notes)
6. `release-drafter.yml` (Drafts the next release notes)

This workflow is run to update the next releases notes as pull requests are
merged into master.
Expand Down Expand Up @@ -131,31 +131,28 @@ https://github.com/release-drafter/release-drafter.
The drafted release notes are not perfect, so we will need to tidy it prior to
publishing the actual release notes at https://www.pygmt.org/latest/changes.html.

1. Generate a list of commits between the last release tag and now:
1. Go to https://github.com/GenericMappingTools/pygmt/releases and click on the
'Edit' button next to the current draft release note. Copy the text of the
automatically drafted release notes under the 'Write' tab to
`doc/changes.md`. Add a section separator `---` between the new and old
changelog sections.
2. Update the DOI badge in the changelog. Remember to replace the DOI number
inside the badge url.

```bash
git log HEAD...v0.1.2 --pretty="* %s" > changes.txt
```

2. Edit the changes list to remove any trivial changes (updates to the README, typo
fixes, CI configuration, etc).
3. Replace the PR number in the commit titles with a link to the GitHub PR page.
Use ``sed -i.bak -E 's$\(#([0-9]*)\)$(`#\1 <https://github.com/GenericMappingTools/pygmt/pull/\1>`__)$g' changes.rst``
to make the change automatically.
4. Copy the remaining changes to `doc/changes.rst` under a new section for the
intended release.
5. Add a list of people who contributed to the release (use
`` git shortlog HEAD...v0.1.2 -sne ``).
6. Include the DOI badge in the changelog. Remember to replace your DOI inside the badge url.

[![Digital Object Identifier for PyGMT vX.Y.Z](https://zenodo.org/badge/DOI/10.5281/zenodo.<INSERT-DOI-HERE>.svg)](https://doi.org/10.5281/zenodo.<INSERT-DOI-HERE>)
```
.. image:: https://zenodo.org/badge/DOI/<INSERT-DOI-HERE>.svg
:alt: Digital Object Identifier for the Zenodo archive
:target: https://doi.org/<INSERT-DOI-HERE>
```

7. Add a link to the new release version documentation in `README.rst`.
8. Open a new PR with the updated changelog.
3. Open a new Pull Request using the title 'Changelog entry for vX.Y.Z' with
the updated release notes, so that other people can help to review and
collaborate on the changelog curation process described next.
4. Edit the change list to remove any trivial changes (updates to the README,
typo fixes, CI configuration, etc).
5. Edit the list of people who contributed to the release, linking to their
GitHub account. Sort their names by the number of commits made since the
last release (e.g. use `` git shortlog HEAD...v0.1.2 -sne ``).
6. Update `README.rst` with new information on the new release version, namely
the BibTeX citation, a vX.Y.Z documentation link, and compatibility with
Python and GMT versions.

### Check the README syntax

Expand Down

0 comments on commit b6050c9

Please sign in to comment.