Skip to content

version 0.2.0

version 0.2.0 #10

Workflow file for this run

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: |
curl -sSL https://install.python-poetry.org | POETRY_VIRTUALENVS_IN_PROJECT=true python3 - && \
poetry install --no-cache --compile --only main
# 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