Skip to content

Commit

Permalink
release-geopackages.yml: Append EPSG number to GeoPackage filenames
Browse files Browse the repository at this point in the history
to prevent filename collision in GitHub release assets
  • Loading branch information
anthonyfok authored and wkhchow committed Dec 16, 2022
1 parent fe3f04b commit a33eeec
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/release-geopackages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,37 @@ jobs:
ls -l
du -csh .git/lfs
- name: Calculate checksum of GeoPackages
# The GeoPackage files inside hexgrid_3857/ and hexgrid_4326/ have identical names,
# but GitHub release assets do not have subdirectories,
# so this step append the EPSG number to the end of the file name
# to prevent filename collision.
- name: Copy and rename GeoPackage files in preparation for upload
run: |
set -x
sha256sum -b */*.7z *.7z > opendrr-boundaries-gpkg-7z.sha256sum
mkdir release
cp -alv ./*.7z release/
for epsg in 3857 4326; do
pushd "hexgrid_$epsg" || exit 1
for file in *.7z; do
cp -alv "$file" ../release/"$(basename "$file" .7z)_$epsg.7z"
done
popd || exit 1
done
- name: Calculate checksum of GeoPackage files
run: |
set -x
cd release
sha256sum -b *.7z > opendrr-boundaries-gpkg-7z.sha256sum
cat opendrr-boundaries-gpkg-7z.sha256sum
ls -l
- name: "Upload GeoPackages as release assets using xresloader/upload-to-github-release@v1"
- name: "Upload GeoPackage files as release assets using xresloader/upload-to-github-release@v1"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "**/*.7z;opendrr-boundaries-gpkg-7z.sha256sum"
file: "release/*.7z;release/opendrr-boundaries-gpkg-7z.sha256sum"
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag || '' }}
tags: true
draft: false

0 comments on commit a33eeec

Please sign in to comment.