diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 057a8f5..1d8d79d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,11 +7,6 @@ on: description: 'Package version to publish (e.g., 0.1.4)' required: true type: string - claude_code_version: - description: 'Claude Code CLI version to bundle (e.g., 2.0.0 or latest)' - required: false - type: string - default: 'latest' jobs: test: runs-on: ubuntu-latest @@ -91,7 +86,6 @@ jobs: run: | python scripts/build_wheel.py \ --version "${{ github.event.inputs.version }}" \ - --cli-version "${{ github.event.inputs.claude_code_version }}" \ --skip-sdist \ --clean shell: bash @@ -132,9 +126,12 @@ jobs: run: | python scripts/update_version.py "${{ env.VERSION }}" - - name: Update CLI version + - name: Read CLI version from code + id: cli_version run: | - python scripts/update_cli_version.py "${{ github.event.inputs.claude_code_version }}" + CLI_VERSION=$(python -c "import re; print(re.search(r'__cli_version__ = \"([^\"]+)\"', open('src/claude_agent_sdk/_cli_version.py').read()).group(1))") + echo "cli_version=$CLI_VERSION" >> $GITHUB_OUTPUT + echo "Bundled CLI version: $CLI_VERSION" - name: Download all wheel artifacts uses: actions/download-artifact@v4 @@ -181,8 +178,8 @@ jobs: git checkout -b "$BRANCH_NAME" # Commit version changes - git add pyproject.toml src/claude_agent_sdk/_version.py src/claude_agent_sdk/_cli_version.py - git commit -m "chore: bump version to ${{ env.VERSION }} with CLI ${{ github.event.inputs.claude_code_version }}" + git add pyproject.toml src/claude_agent_sdk/_version.py + git commit -m "chore: release v${{ env.VERSION }}" - name: Update changelog with Claude continue-on-error: true @@ -207,12 +204,11 @@ jobs: ## Changes - Updated version in \`pyproject.toml\` to ${{ env.VERSION }} - Updated version in \`src/claude_agent_sdk/_version.py\` to ${{ env.VERSION }} - - Updated bundled CLI version in \`src/claude_agent_sdk/_cli_version.py\` to ${{ github.event.inputs.claude_code_version }} - Updated \`CHANGELOG.md\` with release notes ## Release Information - Published to PyPI: https://pypi.org/project/claude-agent-sdk/${{ env.VERSION }}/ - - Bundled CLI version: ${{ github.event.inputs.claude_code_version }} + - Bundled CLI version: ${{ steps.cli_version.outputs.cli_version }} - Install with: \`pip install claude-agent-sdk==${{ env.VERSION }}\` 🤖 Generated by GitHub Actions"