Gazetteer improvements: #8
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# files in data do not change unless | |
# repo URL is updated and new file is downloaded | |
- name: Cache Polygons | |
id: cache-polygons | |
uses: actions/cache@v3 | |
with: | |
path: ./data | |
key: ${{ runner.os }}-polygons | |
- name: Build gazetteer | |
run: | | |
mkdir -p ./data | |
python build.py | |
- name: Changelog | |
uses: scottbrenner/generate-changelog-action@master | |
id: Changelog | |
env: | |
REPO: ${{ github.repository }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
${{ steps.Changelog.outputs.changelog }} | |
draft: false | |
prerelease: false | |
- name: Upload Gazetteer Asset | |
id: upload-gazetteer-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./data/gazetteer.json.zip | |
asset_name: gazetteer.json.zip | |
asset_content_type: application/zip | |
- name: Upload GADM Regions Asset | |
id: upload-region-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./data/gadm41_regions.shp.zip | |
asset_name: gadm41_regions.shp.zip | |
asset_content_type: application/zip |