Skip to content

Update generate_types.yml #11

Update generate_types.yml

Update generate_types.yml #11

name: Generate Types
on:
push:
branches:
- "**" # Runs on all branches for any push
jobs:
generate-types:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code
- name: Checkout code
uses: actions/[email protected]
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
# Step 3: Pull the JSON repo
- name: Pull the JSON repo
run: |
git clone https://github.com/helldivers-2/json
# Debugging: List submodule files to check if the file exists
- name: List submodule files for debugging
run: |
ls -la ./
# Step 4: Run the generate_types script
- name: Run generate_types.py
run: |
python generate_types.py
# Step 5: Commit changes (if any generated file is updated)
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add helldivepy/generated_types.py
git commit -m "Automated update: Regenerated types" || echo "No changes to commit"
git push