forked from GenericMappingTools/pygmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow to upload baseline images as a release asset (GenericM…
…appingTools#1317) * 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
1 parent
3a3aad0
commit 3c67370
Showing
3 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters