Skip to content

Check Biome.js Version #2

Check Biome.js Version

Check Biome.js Version #2

name: Get latest Biome.js version
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch release version
id: release-version
run: |
VERSION=$(curl -sL https://api.github.com/repos/biomejs/biome/releases/latest | jq -r ".tag_name" | sed 's/^[^0-9.]*//g')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "modified=$([ $(cat version.txt) == $VERSION ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT
- name: Commit latest release version
if: steps.release-version.outputs.modified == 'true'
run: |
git config --global user.name 'Christian van der Loo'
git config --global user.email '[email protected]'
git commit -m "chore: release ${{ steps.release-version.outputs.version }}" -m "Release-As: ${{ steps.release-version.outputs.version }}"
git push