Fetch Latest Version Steam #91
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: Fetch Latest Version Steam | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
fetch_latest_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Fetch latest release | |
run: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
curl -s -H "Authorization: token $GITHUB_TOKEN" \ | |
https://api.github.com/repos/SpaceTheme/Steam/releases \ | |
| jq -r '.[0].tag_name' > data/steam.txt | |
- name: Commit and push latest release | |
run: | | |
git config --local user.name "GitHub Action" | |
git config --local user.email "[email protected]" | |
git add data/steam.txt | |
git commit -m "Update latest SteamTheme version" || echo "No new SteamTheme version" | |
git push || echo "No changes to push" |