Skip to content

Commit

Permalink
Add a workflow to upload baseline images as a release asset (#1317)
Browse files Browse the repository at this point in the history
* Add a workflow to upload baseline images as a release asset
* Add the new workflow to maintenance.md

Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
  • Loading branch information
3 people authored Jun 9, 2021
1 parent 63e63f9 commit 69181d1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ assignees: ''
- [ ] 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
- [ ] Manually upload the pygmt-vX.Y.Z.zip and baseline-images.zip files 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
40 changes: 40 additions & 0 deletions .github/workflows/release-baseline-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Upload the ZIP archive of baseline images as a release asset

name: Upload baseline images

# Only run for releases
on:
release:
types:
- published

jobs:
upload-baseline:
name: Upload baseline images
runs-on: ubuntu-latest
if: github.repository == 'GenericMappingTools/pygmt'

steps:
- name: Checkout
uses: actions/checkout@v2.3.4

- name: Setup data version control (DVC)
uses: iterative/setup-dvc@v1.0.3

- name: Pull baseline image data from dvc remote
run: |
dvc pull
ls -lhR pygmt/tests/baseline/
- name: Create the baseline image asset in zip format
run: |
mkdir baseline-images
mv pygmt/tests/baseline/*.png baseline-images/
zip -r baseline-images.zip baseline-images
shasum -a 256 baseline-images.zip
- name: Upload baseline image as a release asset
uses: shogo82148/actions-upload-release-asset@v1.3.0
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: baseline-images.zip
13 changes: 9 additions & 4 deletions doc/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A few guidelines for managing GitHub issues:
[milestone](https://github.com/GenericMappingTools/pygmt/milestones) to issues as
appropriate.
* When people request to work on an open issue, either assign the issue to that person
and post a comment about the assignment or explain why you are not assigning the
and post a comment about the assignment or explain why you are not assigning the
issue to them and, if possible, recommend other issues for them to work on.
* People with write access should self-assign issues and/or comment on the issues that
they will address.
Expand Down Expand Up @@ -69,7 +69,7 @@ build and test the project on Linux, macOS and Windows.
They rely on the `environment.yml` file to install required dependencies using
conda and the `Makefile` to run the tests and checks.

There are 9 configuration files located in `.github/workflows`:
There are 11 configuration files located in `.github/workflows`:

1. `style_checks.yaml` (Code lint and style checks)

Expand Down Expand Up @@ -138,6 +138,11 @@ There are 9 configuration files located in `.github/workflows`:
modified, or deleted. A GitHub comment will be published that contains a summary
table of the images that have changed along with a visual report.

11. `release-baseline-images.yml` (Upload the ZIP archive of baseline images as a release asset)

This workflow is run to upload the ZIP archive of baseline images as a release
asset when a release is published.

## Continuous Documentation

We use the [Vercel for GitHub](https://github.com/apps/vercel) App to preview changes
Expand Down Expand Up @@ -276,8 +281,8 @@ this new folder.
### Archiving on Zenodo
Grab a zip file from the GitHub release and upload to Zenodo using the previously
reserved DOI.
Grab both the source code and baseline images zip files from the GitHub release page
and upload them to Zenodo using the previously reserved DOI.
### Updating the conda package
Expand Down

0 comments on commit 69181d1

Please sign in to comment.