-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (33 loc) · 1 KB
/
action.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
name: Convert Basic
on:
push:
branches:
- master
jobs:
convert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r SC3000/script/requirements.txt
- run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep '^SC3000/.*\.\(bas\|basic\)$' || true)
if [ -n "$CHANGED_FILES" ]; then
echo "Changed Files: "
echo "$CHANGED_FILES"
for FILE in $CHANGED_FILES; do
python SC3000/script/basicToWav.py "$FILE"
done
git config user.name "bot"
git config user.email "github-actions@users.noreply.github.com"
git add .
git commit -m "Add converted file"
git push origin master
else
echo "Nothing to do"
fi