Skip to content

bump version to 3.0.26-fix #18

bump version to 3.0.26-fix

bump version to 3.0.26-fix #18

name: update app-meta.json
on:
push:
branches:
- master
paths:
- 'app-meta.json'
- '.github/workflows/app-meta-update.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "app_meta=https://raw.githubusercontent.com/LuckyPray/XAutoDaily/master/app-meta.json" >> $GITHUB_ENV
- name: Clone pages branch
uses: actions/checkout@v3.3.0
with:
ref: pages
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Update app-meta.json
run: |
curl -sSL ${app_meta} > app-meta.json
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
python generate.py
git add .
if [[ -n $(git status -s) ]]; then
git commit -m "Update app-meta.json"
git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" pages:pages
fi
- name: Purge jsdelivr CDN
run: |
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@pages/${file}"
done