Skip to content

Update GeoNames Data #2

Update GeoNames Data

Update GeoNames Data #2

name: Update GeoNames Data
on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
issues: write
pull-requests: write
jobs:
update-geonames:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install httpx loguru
- name: Run update script
run: python update_allCountries.py
- name: Read release notes
id: release_notes
run: |
RELEASE_NOTES=$(cat release_notes.txt)
echo "RELEASE_NOTES<<EOF" >> $GITHUB_OUTPUT
echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: release-${{ github.run_number }}
name: Release ${{ github.run_number }}
body: ${{ steps.release_notes.outputs.RELEASE_NOTES }}
files: allCountries.zip
draft: false
prerelease: false
- name: Upload release notes
uses: actions/upload-artifact@v3
with:
name: release-notes
path: release_notes.txt