chore: release v0.1.16 #171
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: Get previous release tag | |
| id: previous_tag | |
| run: | | |
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") | |
| echo "previous_tag=$PREVIOUS_TAG" >> $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: | | |
| # Create release with auto-generated notes | |
| gh release create "v${{ steps.extract_version.outputs.version }}" \ | |
| --title "Release v${{ steps.extract_version.outputs.version }}" \ | |
| --generate-notes \ | |
| --notes-start-tag "${{ steps.previous_tag.outputs.previous_tag }}" \ | |
| --notes "Published to PyPI: https://pypi.org/project/claude-agent-sdk/${{ steps.extract_version.outputs.version }}/ | |
| ### Installation | |
| \`\`\`bash | |
| pip install claude-agent-sdk==${{ steps.extract_version.outputs.version }} | |
| \`\`\`" |