Skip to content

Check Biome.js Version #287

Check Biome.js Version

Check Biome.js Version #287

name: Check Biome.js Version
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- 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 --allow-empty -m "feat: release ${{ steps.release-version.outputs.version }}" -m "Release-As: ${{ steps.release-version.outputs.version }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
branch: ${{ github.ref }}