Skip to content

Merge branch 'main' of github.com:samestrin/claude-to-chatgpt-php-dig… #4

Merge branch 'main' of github.com:samestrin/claude-to-chatgpt-php-dig…

Merge branch 'main' of github.com:samestrin/claude-to-chatgpt-php-dig… #4

Workflow file for this run

name: Update README Version Badge
on:
push:
branches:
- main # Ensure this is your default branch
paths:
- "composer.json"
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update README
run: |
VERSION=$(node -p "require('./package.json').version")
sed -i "s/Version [0-9]*\.[0-9]*\.[0-9]*/Version $VERSION/g" README.md
sed -i "s/badge\/Version-[0-9]*\.[0-9]*\.[0-9]*-/badge\/Version-$VERSION-/g" README.md
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "Update version badge"
git push
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}