52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: Sync ADK-TS Versions
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'packages/adk/package.json'
|
|
- '.changeset/**'
|
|
|
|
jobs:
|
|
sync-versions:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.head_ref || github.ref_name }}
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9.0.0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Run version sync
|
|
run: pnpm sync-versions
|
|
|
|
- name: Check for changes
|
|
id: changes
|
|
run: |
|
|
if [[ -n $(git status -s) ]]; then
|
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Commit and push changes
|
|
if: steps.changes.outputs.has_changes == 'true'
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add -A
|
|
git commit -m "chore: sync ADK-TS versions across examples and starters"
|
|
git push |