Chore/pysdk 000 claude doc review #2223
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: "+ Build Native Only" | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| release: | |
| types: [created] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| get-commit-message: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| commit_message: ${{ steps.get-commit-message.outputs.commit_message }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get commit message | |
| id: get-commit-message | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| # For PR events, get the commit message from the PR head SHA | |
| COMMIT_MESSAGE=$(git log -1 --format=%B ${{ github.event.pull_request.head.sha }}) | |
| else | |
| # For push events, use the head commit message | |
| COMMIT_MESSAGE="${{ github.event.head_commit.message }}" | |
| fi | |
| # Export for use in other steps (multiline-safe) | |
| echo "commit_message<<EOF" >> $GITHUB_OUTPUT | |
| echo "$COMMIT_MESSAGE" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| check-trigger-condition: | |
| runs-on: ubuntu-latest | |
| needs: get-commit-message | |
| permissions: | |
| contents: read | |
| outputs: | |
| should_run: ${{ steps.check.outputs.should_run }} | |
| steps: | |
| - name: Check if workflow should run | |
| id: check | |
| run: | | |
| if [[ "${{ contains(needs.get-commit-message.outputs.commit_message, 'build:native:only') }}" == "true" ]] || \ | |
| [[ "${{ contains(github.event.pull_request.labels.*.name, 'build:native:only') }}" == "true" ]]; then | |
| echo "should_run=true" >> $GITHUB_OUTPUT | |
| echo "✅ Workflow triggered: Found 'build:native:only' in commit message or PR labels" | |
| else | |
| echo "should_run=false" >> $GITHUB_OUTPUT | |
| echo "⏭️ Workflow skipped: 'build:native:only' not found in commit message or PR labels" | |
| fi | |
| only_build_native: | |
| needs: [get-commit-message, check-trigger-condition] | |
| if: needs.check-trigger-condition.outputs.should_run == 'true' | |
| uses: ./.github/workflows/_build-native-only.yml | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| packages: write |