| name: "Release: Promote" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'The final version to release (e.g., 0.38.0)' | |
| required: true | |
| type: string | |
| workflow_call: | |
| inputs: | |
| version: | |
| description: 'The final version to release (e.g., 0.38.0)' | |
| required: false | |
| type: string | |
| issue: | |
| description: 'The tracking issue number' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| issues: write | |
| jobs: | |
| promote: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.promote.outputs.version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bazel | |
| uses: ./.github/actions/setup-bazel | |
| - name: Configure Git Identity | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Run Promote RC | |
| id: promote | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VERSION: ${{ inputs.version }} | |
| ISSUE: ${{ inputs.issue }} | |
| run: | | |
| ARGS=() | |
| if [ -n "$VERSION" ]; then | |
| ARGS+=("$VERSION") | |
| fi | |
| if [ -n "$ISSUE" ]; then | |
| ARGS+=("--issue=$ISSUE") | |
| fi | |
| ARGS+=("--remote=origin") | |
| ARGS+=("--no-dry-run") | |
| bazel run \ | |
| --//python/config_settings:py_pbs_distribution=install_only_stripped \ | |
| //dev/release -- promote "${ARGS[@]}" | |
| publish: | |
| needs: promote | |
| uses: ./.github/workflows/release_publish.yaml | |
| with: | |
| tag_name: ${{ needs.promote.outputs.version }} | |
| publish_to_pypi: true | |
| secrets: inherit |