cc-audit 3.2.14

Security auditor for Claude Code skills, hooks, and MCP servers
Documentation
name: Release Please

on:
  push:
    branches:
      - main
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  release-please:
    runs-on: ubuntu-latest
    outputs:
      release_created: ${{ steps.release.outputs.release_created }}
      tag_name: ${{ steps.release.outputs.tag_name }}
      pr: ${{ steps.release.outputs.pr }}
    steps:
      - uses: googleapis/release-please-action@v4
        id: release
        with:
          release-type: rust
          # PAT を使用してPR作成権限の制限を回避
          # GITHUB_TOKENではリポジトリ設定で許可されていない場合にPR作成が失敗する
          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

  # CI が全てパスしたら Release PR を自動マージ
  auto-merge:
    needs: release-please
    if: ${{ needs.release-please.outputs.pr && !needs.release-please.outputs.release_created }}
    runs-on: ubuntu-latest
    steps:
      - name: Enable auto-merge for Release PR
        env:
          GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
          PR_NUMBER: ${{ fromJson(needs.release-please.outputs.pr).number }}
        run: |
          gh pr merge $PR_NUMBER --repo ${{ github.repository }} --auto --squash