Add YT as release source #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "\"Compile\" Groovy Scripts" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "compiled/**" | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure Git | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Run Groovy Compiler | |
run: | | |
# Find groovy files starts with _ on current directory | |
groovyFiles=$(find . -type f -name "_*.groovy") | |
# Compile each groovy file | |
for file in $groovyFiles; do | |
compiledFile="compiled/$(basename "$file" | sed 's/^_//')" | |
echo "Compiling $file to $compiledFile" | |
python3 compiler.py "$file" "$compiledFile" | |
done | |
- name: Commit and Push Changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git add compiled | |
git commit -m "Compile Groovy Scripts" | |
git push |