Skip to content

v0.1.1106 (#2401) #1880

v0.1.1106 (#2401)

v0.1.1106 (#2401) #1880

Workflow file for this run

name: Update README with CLI Usage
on:
push:
branches: [main]
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Update README with CLI usage
run: |
bun scripts/generate-readme-help-output.ts
- name: Close existing PRs
run: |
gh pr list --repo ${{ github.repository }} --state open --author "tscircuitbot" --json number,title --jq '.[] | select(.title == "chore: Update CLI usage in README") | .number' | xargs -I{} gh pr close {} --comment "Closing in favor of a new update PR"
env:
GH_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v5
with:
commit-message: "chore: Update CLI usage in README"
title: "chore: Update CLI usage in README"
body: "Automated README update with latest CLI usage output."
branch: update-readme-cli-${{ github.run_number }}
base: main
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
committer: tscircuitbot <githubbot@tscircuit.com>
author: tscircuitbot <githubbot@tscircuit.com>
- name: Enable auto-merge with CI checks
if: steps.create-pr.outputs.pull-request-number != ''
run: |
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --auto --squash --delete-branch
env:
GH_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}