Add e2e test and example for filesystem-based agents #178
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: Create Release Tag | ||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] | ||
| jobs: | ||
| create-tag: | ||
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Extract version from branch name | ||
| id: extract_version | ||
| run: | | ||
| BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
| VERSION="${BRANCH_NAME#release/v}" | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| - name: Create and push tag | ||
| run: | | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
| # Create annotated tag | ||
| git tag -a "v${{ steps.extract_version.outputs.version }}" \ | ||
| -m "Release v${{ steps.extract_version.outputs.version }}" | ||
| # Push tag | ||
| git push origin "v${{ steps.extract_version.outputs.version }}" | ||
| - name: Create GitHub Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| VERSION="${{ steps.extract_version.outputs.version }}" | ||
| # Extract changelog section for this version to a temp file | ||
| awk -v ver="$VERSION" ' | ||
| /^## / { | ||
| if (found) exit | ||
| if ($2 == ver) found=1 | ||
| next | ||
| } | ||
| found { print } | ||
| ' CHANGELOG.md > release_notes.md | ||
| # Append install instructions | ||
| cat >> release_notes.md << 'EOF' | ||
| --- | ||
| **PyPI:** https://pypi.org/project/claude-agent-sdk/VERSION/ | ||
| ```bash | ||
| pip install claude-agent-sdk==VERSION | ||
| ``` | ||
| EOF | ||
| # Replace VERSION placeholder | ||
| sed -i "s/VERSION/$VERSION/g" release_notes.md | ||
| # Create release with notes from file | ||
| gh release create "v$VERSION" \ | ||
| --title "v$VERSION" \ | ||
| --notes-file release_notes.md | ||