Release Checker #2966
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: Release Checker | |
on: | |
schedule: | |
- cron: '0 0,12 * * *' | |
jobs: | |
Release-Checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.REPO_SCOPED_TOKEN }} | |
- name: Fetch latest release version | |
id: fetch-release | |
run: | | |
curl -s https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest | jq -r ".tag_name" > release-versions/latest.txt | |
echo ::set-output name=success::$([ "$(cat release-versions/latest.txt)" == 'null' ] && echo "false" || echo "true") | |
- name: Check for modified files | |
id: git-check | |
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | |
- name: Commit latest release version | |
if: | | |
steps.fetch-release.outputs.success == 'true' && | |
steps.git-check.outputs.modified == 'true' | |
run: | | |
git config --global user.name 'Release Checker' | |
git commit -am "Release: v$(cat release-versions/latest.txt)" | |
git push |