From e5b07416ea13765b442beea035f0d583c095163e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8D=E3=82=8F=E3=81=BF=E3=81=96=E3=82=80=E3=82=89?= =?UTF-8?q?=E3=81=84?= <24860100+kiwamizamurai@users.noreply.github.com> Date: Tue, 23 Dec 2025 11:59:34 +0900 Subject: [PATCH] chore: remove unused ci yaml file (#763) * fix: Replace direct template expansion in bump-claude-code-version workflow * chore: remove bump-claude-code-version workflow file --- .../workflows/bump-claude-code-version.yml | 132 ------------------ 1 file changed, 132 deletions(-) delete mode 100644 .github/workflows/bump-claude-code-version.yml diff --git a/.github/workflows/bump-claude-code-version.yml b/.github/workflows/bump-claude-code-version.yml deleted file mode 100644 index a2dbba4..0000000 --- a/.github/workflows/bump-claude-code-version.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Bump Claude Code Version - -on: - repository_dispatch: - types: [bump_claude_code_version] - workflow_dispatch: - inputs: - version: - description: "Claude Code version to bump to" - required: true - type: string - -permissions: - contents: write - -jobs: - bump-version: - name: Bump Claude Code Version - runs-on: ubuntu-latest - environment: release - timeout-minutes: 5 - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4 - with: - token: ${{ secrets.RELEASE_PAT }} - fetch-depth: 0 - - - name: Get version from event payload - id: get_version - run: | - # Get version from either repository_dispatch or workflow_dispatch - if [ "${{ github.event_name }}" = "repository_dispatch" ]; then - NEW_VERSION="${CLIENT_PAYLOAD_VERSION}" - else - NEW_VERSION="${INPUT_VERSION}" - fi - - # Sanitize the version to avoid issues enabled by problematic characters - NEW_VERSION=$(echo "$NEW_VERSION" | tr -d '`;$(){}[]|&<>' | tr -s ' ' '-') - - if [ -z "$NEW_VERSION" ]; then - echo "Error: version not provided" - exit 1 - fi - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT - env: - INPUT_VERSION: ${{ inputs.version }} - CLIENT_PAYLOAD_VERSION: ${{ github.event.client_payload.version }} - - - name: Create branch and update base-action/action.yml - run: | - # Variables - TIMESTAMP=$(date +'%Y%m%d-%H%M%S') - BRANCH_NAME="bump-claude-code-${{ env.NEW_VERSION }}-$TIMESTAMP" - - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - - # Get the default branch - DEFAULT_BRANCH=$(gh api repos/${GITHUB_REPOSITORY} --jq '.default_branch') - echo "DEFAULT_BRANCH=$DEFAULT_BRANCH" >> $GITHUB_ENV - - # Get the latest commit SHA from the default branch - BASE_SHA=$(gh api repos/${GITHUB_REPOSITORY}/git/refs/heads/$DEFAULT_BRANCH --jq '.object.sha') - - # Create a new branch - gh api \ - --method POST \ - repos/${GITHUB_REPOSITORY}/git/refs \ - -f ref="refs/heads/$BRANCH_NAME" \ - -f sha="$BASE_SHA" - - # Get the current base-action/action.yml content - ACTION_CONTENT=$(gh api repos/${GITHUB_REPOSITORY}/contents/base-action/action.yml?ref=$DEFAULT_BRANCH --jq '.content' | base64 -d) - - # Update the Claude Code version in the npm install command - UPDATED_CONTENT=$(echo "$ACTION_CONTENT" | sed -E "s/(npm install -g @anthropic-ai\/claude-code@)[0-9]+\.[0-9]+\.[0-9]+/\1${{ env.NEW_VERSION }}/") - - # Verify the change would be made - if ! echo "$UPDATED_CONTENT" | grep -q "@anthropic-ai/claude-code@${{ env.NEW_VERSION }}"; then - echo "Error: Failed to update Claude Code version in content" - exit 1 - fi - - # Get the current SHA of base-action/action.yml for the update API call - FILE_SHA=$(gh api repos/${GITHUB_REPOSITORY}/contents/base-action/action.yml?ref=$DEFAULT_BRANCH --jq '.sha') - - # Create the updated base-action/action.yml content in base64 - echo "$UPDATED_CONTENT" | base64 > action.yml.b64 - - # Commit the updated base-action/action.yml via GitHub API - gh api \ - --method PUT \ - repos/${GITHUB_REPOSITORY}/contents/base-action/action.yml \ - -f message="chore: bump Claude Code version to ${{ env.NEW_VERSION }}" \ - -F content=@action.yml.b64 \ - -f sha="$FILE_SHA" \ - -f branch="$BRANCH_NAME" - - echo "Successfully created branch and updated Claude Code version to ${{ env.NEW_VERSION }}" - env: - GH_TOKEN: ${{ secrets.RELEASE_PAT }} - GITHUB_REPOSITORY: ${{ github.repository }} - - - name: Create Pull Request - run: | - # Determine trigger type for PR body - if [ "${{ github.event_name }}" = "repository_dispatch" ]; then - TRIGGER_INFO="repository dispatch event" - else - TRIGGER_INFO="manual workflow dispatch by @${GITHUB_ACTOR}" - fi - - # Create PR body with proper YAML escape - printf -v PR_BODY "## Bump Claude Code to ${{ env.NEW_VERSION }}\n\nThis PR updates the Claude Code version in base-action/action.yml to ${{ env.NEW_VERSION }}.\n\n### Changes\n- Updated Claude Code version from current to \`${{ env.NEW_VERSION }}\`\n\n### Triggered by\n- $TRIGGER_INFO\n\n🤖 This PR was automatically created by the bump-claude-code-version workflow." - - echo "Creating PR with gh pr create command" - PR_URL=$(gh pr create \ - --repo "${GITHUB_REPOSITORY}" \ - --title "chore: bump Claude Code version to ${{ env.NEW_VERSION }}" \ - --body "$PR_BODY" \ - --base "${DEFAULT_BRANCH}" \ - --head "${BRANCH_NAME}") - - echo "PR created successfully: $PR_URL" - env: - GH_TOKEN: ${{ secrets.RELEASE_PAT }} - GITHUB_REPOSITORY: ${{ github.repository }} - GITHUB_ACTOR: ${{ github.actor }} - DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }} - BRANCH_NAME: ${{ env.BRANCH_NAME }}