Skip to content

Get latest release version #607

Get latest release version

Get latest release version #607

name: Get latest release version
on:
workflow_dispatch:
schedule:
- cron: '0 13 * * *'
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
- name: Fetch release version
run: |
curl -sL https://api.github.com/repos/surgioproject/surgio/releases/latest | \
jq -r ".tag_name" > release-versions/surgio-latest.txt
- 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.git-check.outputs.modified == 'true'
run: |
git config --global user.name 'Kare-Udon'
git config --global user.email '[email protected]@users.noreply.github.com'
git commit -am "New release version"
git push