Automatic Update #972
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: Automatic Update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update-lilypond: | |
name: Update LilyPond | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Fetch Latest Versions | |
# "download" source corresponds to the latest stable version. | |
# "development" source corresponds to the latest dev version. | |
run: | | |
set -e | |
for source in download development; do | |
version=$(curl -sS "https://lilypond.org/$source.html" | grep -E --only-matching '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' | head -n1) | |
echo "Found version $version" | |
VERSION="$version" jq '.[env.VERSION | capture("(?<v>\\d+.\\d+).\\d+").v].version = env.VERSION' versions.json > versions.json.tmp | |
mv versions.json.tmp versions.json | |
done | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: update-lilypond | |
commit-message: Update LilyPond | |
title: Update LilyPond | |
delete-branch: true | |