diff --git a/.github/workflows/release-baseline-images.yml b/.github/workflows/release-baseline-images.yml new file mode 100644 index 00000000000..ac67ac46c84 --- /dev/null +++ b/.github/workflows/release-baseline-images.yml @@ -0,0 +1,42 @@ +# Upload the archive of baseline images as 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 == 'seisman/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 + + - 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 + + +