Improve challenge generation #2
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: Create Release with JSON Artifacts | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run large_stop_area_bbox script | |
run: python challenges/large_stop_area_bbox/main.py | |
- name: Run stop_area_names_from_platform_names script | |
run: python challenges/stop_area_names_from_platform_names/main.py | |
- name: Create JSON artifacts directory | |
run: mkdir -p artifacts | |
- name: Move JSON files to artifacts | |
run: | | |
mv large_stop_area_bbox.json artifacts/ | |
mv stop_area_names_from_platform_names.json artifacts/ | |
- name: Get current date | |
id: get_date | |
run: echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "${{ env.DATE }}+${{ github.run_number }}" | |
tag_name: "${{ env.DATE }}+${{ github.run_number }}" | |
body: 'Release with JSON artifacts' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: artifacts/*.json |