From 9178bb77b17f65e64671e0ec0a05f57d7051eb81 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Thu, 21 May 2020 20:19:01 +1200 Subject: [PATCH 1/6] Add release checklist template Modelled on upstream GMT's https://github.com/GenericMappingTools/gmt/blob/master/.github/ISSUE_TEMPLATE/release_checklist.md. --- .github/ISSUE_TEMPLATE/release_checklist.md | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/release_checklist.md diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md new file mode 100644 index 00000000000..c9ef3baf77c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -0,0 +1,36 @@ +--- +name: PyGMT release checklist +about: Checklist for a new PyGMT release. +title: 'Release PyGMT x.x.x' +labels: 'maintenance' +assignees: '' + +--- + +**Release**: [v0.x.x](https://github.com/GenericMappingTools/pygmt/milestones/0.x.x) +**Scheduled Date**: YYYY/MM/DD + +**Before release**: +- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) +- [ ] Update Changelog + +**Release**: +- [ ] Make a tag and push it to Github +``` +git tag x.x.x +git push --tags +``` +- [ ] Go to [GitHub Release](https://github.com/GenericMappingTools/pygmt/releases) and make a release +- [ ] Announce release on the GMT forum and [website](https://www.generic-mapping-tools.org) (News) +- [ ] Upload the pygmt-v0.x.x.zip file to Zenodo + +**After release**: +- [ ] Create branch 0.x for bug-fixes if this is a minor release (i.e. create branch 0.1 after 0.1.0 is released) +- [ ] Commit changes to Github + +**3rd party update**: +- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) + +--- + +- [ ] Party :tada: (don't tick before all other checkboxes are ticked!) From f6e76357507e3c8a691d48e6ecc6c4badd6c9553 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Thu, 21 May 2020 21:15:16 +1200 Subject: [PATCH 2/6] Add Release Drafter Github Action Automatically keeps a running changelog at https://github.com/GenericMappingTools/pygmt/releases every time a Pull Request is merged with a tagged label. Also documented this release-drafter tool in MAINTENANCE.md. --- .github/release-drafter.yml | 26 ++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 19 +++++++++++++++++++ MAINTENANCE.md | 11 +++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000000..af130e041fc --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,26 @@ +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' +categories: + - title: 'New Features' + label: 'feature' + - title: 'Enhancements' + label: 'enhancement' + - title: 'Documentation' + label: 'documentation' + - title: 'Bug Fixes' + label: 'bug' + - title: 'Maintenance' + label: 'maintenance' + - title: 'Deprecations' + label: 'deprecation' +exclude-labels: + - 'skip-changelog' +change-template: '* $TITLE (#$NUMBER) @$AUTHOR' +template: | + [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3781524.svg)](https://doi.org/10.5281/zenodo.3781524) + + ## Highlights + + * + + $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000000..242e0075e3b --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,19 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5.8.0 + with: + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # config-name: my-config.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/MAINTENANCE.md b/MAINTENANCE.md index b117af3a01d..bd56835fb93 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -81,6 +81,17 @@ There are a few steps that still must be done manually, though. ### Updating the changelog +The Release Drafter Github Action will automatically keep a draft changelog at +https://github.com/GenericMappingTools/pygmt/releases, adding a new entry +every time a Pull Request (with a proper label) is merged into the master branch. +This release drafter tool has two configuration files, one for the Github Action +at .github/workflows/release-drafter.yml, and one for the changelog template +at .github/release-drafter.yml. Configuration settings can be found at +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: ```bash From 8b93b58842d4e3814c1a9b762a907cc73c00402e Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 22 May 2020 15:18:08 +1200 Subject: [PATCH 3/6] Update tag to use format vX.Y.Z Co-authored-by: Dongdong Tian --- .github/ISSUE_TEMPLATE/release_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index c9ef3baf77c..e4445861439 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -17,7 +17,7 @@ assignees: '' **Release**: - [ ] Make a tag and push it to Github ``` -git tag x.x.x +git tag vX.Y.Z git push --tags ``` - [ ] Go to [GitHub Release](https://github.com/GenericMappingTools/pygmt/releases) and make a release From f2842c03d94fca0826fc42e23426da5cfb0f752c Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Fri, 22 May 2020 15:58:22 +1200 Subject: [PATCH 4/6] Clarify manual instructions for Zenodo DOI and upload --- .github/ISSUE_TEMPLATE/release_checklist.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index e4445861439..98ba31dcfa5 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -11,7 +11,7 @@ assignees: '' **Scheduled Date**: YYYY/MM/DD **Before release**: -- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) +- [ ] Reserve a DOI on [Zenodo](https://zenodo.org) by clicking on "New Version" - [ ] Update Changelog **Release**: @@ -21,8 +21,8 @@ git tag vX.Y.Z git push --tags ``` - [ ] Go to [GitHub Release](https://github.com/GenericMappingTools/pygmt/releases) and make a release +- [ ] Manually upload the pygmt-vX.Y.Z.zip file to https://zenodo.org/deposit, make sure you file it under the correct reserved DOI - [ ] Announce release on the GMT forum and [website](https://www.generic-mapping-tools.org) (News) -- [ ] Upload the pygmt-v0.x.x.zip file to Zenodo **After release**: - [ ] Create branch 0.x for bug-fixes if this is a minor release (i.e. create branch 0.1 after 0.1.0 is released) From 690226179d8855bf6da578b432cc93c819060c81 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Fri, 22 May 2020 00:36:17 -0400 Subject: [PATCH 5/6] Update the instructions for updating the conda package (#448) * Update the instructions for updating the conda package Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/release_checklist.md | 2 +- MAINTENANCE.md | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index 98ba31dcfa5..cd9f0df7457 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -29,7 +29,7 @@ git push --tags - [ ] Commit changes to Github **3rd party update**: -- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) +- [ ] Update conda-forge [pygmt-feedstock](https://github.com/conda-forge/pygmt-feedstock) [Usually done automatically by conda-forge's bot] --- diff --git a/MAINTENANCE.md b/MAINTENANCE.md index bd56835fb93..b33a68be717 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -152,17 +152,18 @@ this new folder. Grab a zip file from the Github release and upload to Zenodo using the previously reserved DOI. -### Updating the conda package (Not available yet) +### Updating the conda package -After Travis is done building the tag and all builds pass, we need to update the conda -package. -Unfortunately, this needs to be done manually for now. +When a new version is released on PyPI, conda-forge's bot automatically creates version +updates for the feedstock. In most cases, the maintainers can simply merge that PR. -1. Fork the feedstock repository (https://github.com/conda-forge/pygmt-feedstock) if +If changes need to be done manually, you can: + +1. Fork the [pygmt feedstock repository](https://github.com/conda-forge/pygmt-feedstock) if you haven't already. If you have a fork, update it. 2. Update the version number and sha256 hash on `recipe/meta.yaml`. You can get the hash from the PyPI "Download files" section. 3. Add or remove any new dependencies (most are probably only `run` dependencies). -4. Make a new branch, commit, and push your changes **to your fork**. +4. Make a new branch, commit, and push the changes **to your personal fork**. 5. Create a PR against the original feedstock master. -6. Once the CIs are passing, merge or as a maintainer to do so. +6. Once the CI tests pass, merge the PR or ask a maintainer to do so. From 22778529015875892bf83b6a4c76c75066da475f Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Mon, 25 May 2020 14:36:13 +1200 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Dongdong Tian --- .github/ISSUE_TEMPLATE/release_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index cd9f0df7457..b71d767b7b4 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -22,7 +22,7 @@ git push --tags ``` - [ ] Go to [GitHub Release](https://github.com/GenericMappingTools/pygmt/releases) and make a release - [ ] Manually upload the pygmt-vX.Y.Z.zip file to https://zenodo.org/deposit, make sure you file it under the correct reserved DOI -- [ ] Announce release on the GMT forum and [website](https://www.generic-mapping-tools.org) (News) +- [ ] Announce the releases on the GMT [forum](https://forum.generic-mapping-tools.org/c/news/), [website](https://github.com/GenericMappingTools/website) (News) and [ResearchGate](https://www.researchgate.net/project/PyGMT-A-Python-interface-for-the-Generic-Mapping-Tools) **After release**: - [ ] Create branch 0.x for bug-fixes if this is a minor release (i.e. create branch 0.1 after 0.1.0 is released)