test(keychain): use inline authorization #66
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog | |
| on: | |
| pull_request: | |
| types: [opened] | |
| jobs: | |
| changelog: | |
| if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref }} | |
| - name: Install changelogs | |
| run: | | |
| VERSION="0.6.3" | |
| EXPECTED_SHA="d4168ee68b612224a26a39e86bfd2c923ac3dd2de12ee43d2bb65a5ea19df6b6" | |
| curl -fsSL "https://github.com/wevm/changelogs/releases/download/changelogs%40${VERSION}/changelogs-linux-amd64" -o /usr/local/bin/changelogs | |
| echo "${EXPECTED_SHA} /usr/local/bin/changelogs" | sha256sum -c - | |
| chmod +x /usr/local/bin/changelogs | |
| - name: Install Claude CLI | |
| run: npm install -g @anthropic-ai/claude-code@2.1.96 | |
| - name: Generate changelog | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| CHANGED=$(git diff --name-only origin/"$BASE_REF"...HEAD) | |
| CODE_CHANGES=$(echo "$CHANGED" | grep -vE '^(\.changelog/|\.github/|\.gitignore|README\.md|AGENTS\.md)' || true) | |
| if [ -z "$CODE_CHANGES" ]; then | |
| echo "No code changes requiring changelog, skipping" | |
| exit 0 | |
| fi | |
| changelogs add --ecosystem python --ai "claude -p" --ref origin/"$BASE_REF" | |
| - name: Commit changelog | |
| run: | | |
| if [ -n "$(git status --porcelain .changelog/)" ]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .changelog/ | |
| git commit -m "chore: add changelog" | |
| git push | |
| fi |