47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Generate Release Files
|
|
|
|
on:
|
|
schedule:
|
|
# Run daily at 00:00 UTC
|
|
- cron: '0 0 * * *'
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
jobs:
|
|
generate-releases:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write # Required to commit and push changes
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Generate release files
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }}
|
|
run: python3 generate_release_files.py
|
|
|
|
- name: Check for changes
|
|
id: verify-changed-files
|
|
run: |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "changed=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Commit and push changes
|
|
if: steps.verify-changed-files.outputs.changed == 'true'
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add "include/*/RELEASE_*.ini"
|
|
git commit -m "chore: update release files [skip ci]"
|
|
git push
|