-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1004 Bytes
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Workflow
on:
schedule:
- cron: "0 0 * * *" # execute at 00:00 everyday
push:
branches:
- "**"
paths:
- ".github/workflows/workflow.yml"
- "gh_release_download"
- "gh_release_config.yml"
- "README.md"
workflow_dispatch:
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run script based on 'gh' and commit download releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
./gh_release_download --all --install --verbose
rm -rf ./bin && mv ~/.gh_releases/bin ./bin
if [ -z "$(git status --porcelain)" ]; then
echo "No new files to commit."
exit 0
fi
git add .
git commit -m "Update releases [skip ci]"
git push