Skip to content

Prepare 2.30.0 (#22939) #363

Prepare 2.30.0 (#22939)

Prepare 2.30.0 (#22939) #363

Workflow file for this run

# GENERATED, DO NOT EDIT!
# To change, edit `src/python/pants_release/generate_github_workflows.py` and run:
# ./pants run src/python/pants_release/generate_github_workflows.py
jobs:
build_wheels_linux_arm64:
container:
image: quay.io/pypa/manylinux_2_28_aarch64:latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (Linux-ARM64)
needs:
- release_info
permissions:
attestations: write
contents: write
id-token: write
runs-on:
- self-hosted
- runs-on
- runner=4cpu-linux-arm64
- image=ubuntu22-full-arm64-python3.7-3.13
- run-id=${{ github.run_id }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Configure Git
run: git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -v -y --default-toolchain none
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- name: Install Rust toolchain
run: |
# Set the default toolchain. Installs the toolchain if it is not already installed.
rustup default 1.89.0
cargo version
- name: Expose Pythons
run: |
echo "/opt/python/cp37-cp37m/bin" >> $GITHUB_PATH
echo "/opt/python/cp38-cp38/bin" >> $GITHUB_PATH
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Python headers
run: yum install -y python3.11-devel
- env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
- env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Build Pants PEX
run: ./pants package src/python/pants:pants-pex
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-Linux-ARM64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the pantsbuild.pants wheel
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/deploy/wheels/pantsbuild.pants/**/pantsbuild_pants-*.whl
- if: needs.release_info.outputs.is-release == 'true'
name: Rename the Pants Pex to its final name for upload
run: |
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
echo "PEX_FILENAME=$PEX_FILENAME" | tee -a "$GITHUB_ENV"
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the Pants Pex artifact
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/src.python.pants/*.pex
- if: needs.release_info.outputs.is-release == 'true'
name: Upload Wheel and Pex
run: |
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
${{ needs.release_info.outputs.release-asset-upload-url }}?name=$PEX_FILENAME \
--data-binary "@dist/src.python.pants/$PEX_FILENAME"
WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name "pantsbuild_pants-*.whl")
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
"${{ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)" \
--data-binary "@$WHL";
timeout-minutes: 90
build_wheels_linux_x86_64:
container:
image: quay.io/pypa/manylinux_2_28_x86_64:latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (Linux-x86_64)
needs:
- release_info
permissions:
attestations: write
contents: write
id-token: write
runs-on:
- ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Configure Git
run: git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -v -y --default-toolchain none
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- name: Install Rust toolchain
run: |
# Set the default toolchain. Installs the toolchain if it is not already installed.
rustup default 1.89.0
cargo version
- name: Expose Pythons
run: |
echo "/opt/python/cp37-cp37m/bin" >> $GITHUB_PATH
echo "/opt/python/cp38-cp38/bin" >> $GITHUB_PATH
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.25.3
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.24.9
- env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_PROCESS_EXECUTION_LOCAL_PARALLELISM: '1'
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
- env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_PROCESS_EXECUTION_LOCAL_PARALLELISM: '1'
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Build Pants PEX
run: ./pants package src/python/pants:pants-pex
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-Linux-x86_64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the pantsbuild.pants wheel
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/deploy/wheels/pantsbuild.pants/**/pantsbuild_pants-*.whl
- if: needs.release_info.outputs.is-release == 'true'
name: Rename the Pants Pex to its final name for upload
run: |
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
echo "PEX_FILENAME=$PEX_FILENAME" | tee -a "$GITHUB_ENV"
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the Pants Pex artifact
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/src.python.pants/*.pex
- if: needs.release_info.outputs.is-release == 'true'
name: Upload Wheel and Pex
run: |
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
${{ needs.release_info.outputs.release-asset-upload-url }}?name=$PEX_FILENAME \
--data-binary "@dist/src.python.pants/$PEX_FILENAME"
WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name "pantsbuild_pants-*.whl")
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
"${{ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)" \
--data-binary "@$WHL";
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the pantsbuild.pants.testutil wheel
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/deploy/wheels/pantsbuild.pants/**/pantsbuild_pants_testutil*.whl
- if: needs.release_info.outputs.is-release == 'true'
name: Upload testutil Wheel
run: |
WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name "pantsbuild_pants_testutil*.whl")
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
"${{ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)" \
--data-binary "@$WHL";
timeout-minutes: 90
build_wheels_macos13_x86_64:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: false
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (macOS13-x86_64)
needs:
- release_info
permissions:
attestations: write
contents: write
id-token: write
runs-on:
- self-hosted
- macos-13
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Set rustup profile
run: rustup set profile default
- name: Cache Rust toolchain
uses: actions/cache@v4
with:
key: macOS13-x86_64-rustup-${{ hashFiles('src/rust/rust-toolchain') }}-v2
path: |
~/.rustup/toolchains/1.89.0-*
~/.rustup/update-hashes
~/.rustup/settings.toml
- name: Cache Cargo
uses: Swatinem/rust-cache@v2.8.1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.25.3
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.24.9
- env:
ARCHFLAGS: -arch x86_64
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
- env:
ARCHFLAGS: -arch x86_64
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
name: Build Pants PEX
run: ./pants package src/python/pants:pants-pex
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-macOS13-x86_64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the pantsbuild.pants wheel
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/deploy/wheels/pantsbuild.pants/**/pantsbuild_pants-*.whl
- if: needs.release_info.outputs.is-release == 'true'
name: Rename the Pants Pex to its final name for upload
run: |
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
echo "PEX_FILENAME=$PEX_FILENAME" | tee -a "$GITHUB_ENV"
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the Pants Pex artifact
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/src.python.pants/*.pex
- if: needs.release_info.outputs.is-release == 'true'
name: Upload Wheel and Pex
run: |
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
${{ needs.release_info.outputs.release-asset-upload-url }}?name=$PEX_FILENAME \
--data-binary "@dist/src.python.pants/$PEX_FILENAME"
WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name "pantsbuild_pants-*.whl")
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
"${{ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)" \
--data-binary "@$WHL";
timeout-minutes: 90
build_wheels_macos14_arm64:
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: false
PANTS_REMOTE_CACHE_READ: 'false'
PANTS_REMOTE_CACHE_WRITE: 'false'
if: github.repository_owner == 'pantsbuild'
name: Build wheels (macOS14-ARM64)
needs:
- release_info
permissions:
attestations: write
contents: write
id-token: write
runs-on:
- macos-14
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Set up Python 3.9, 3.10, 3.12, 3.13, 3.11
uses: actions/setup-python@v5
with:
python-version: |-
3.9
3.10
3.12
3.13
3.11
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Set rustup profile
run: rustup set profile default
- name: Cache Rust toolchain
uses: actions/cache@v4
with:
key: macOS14-ARM64-rustup-${{ hashFiles('src/rust/rust-toolchain') }}-v2
path: |
~/.rustup/toolchains/1.89.0-*
~/.rustup/update-hashes
~/.rustup/settings.toml
- name: Cache Cargo
uses: Swatinem/rust-cache@v2.8.1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.25.3
- name: Install Go
uses: actions/setup-go@7bc60db215a8b16959b0b5cccfdc95950d697b25
with:
go-version: 1.24.9
- env:
ARCHFLAGS: -arch arm64
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
name: Build wheels
run: ./pants run src/python/pants_release/release.py -- build-wheels
- env:
ARCHFLAGS: -arch arm64
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
name: Build Pants PEX
run: ./pants package src/python/pants:pants-pex
- continue-on-error: true
if: always()
name: Upload pants.log
uses: actions/upload-artifact@v4
with:
name: logs-wheels-and-pex-macOS14-ARM64
overwrite: 'true'
path: .pants.d/workdir/*.log
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the pantsbuild.pants wheel
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/deploy/wheels/pantsbuild.pants/**/pantsbuild_pants-*.whl
- if: needs.release_info.outputs.is-release == 'true'
name: Rename the Pants Pex to its final name for upload
run: |
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
echo "PEX_FILENAME=$PEX_FILENAME" | tee -a "$GITHUB_ENV"
- if: needs.release_info.outputs.is-release == 'true'
name: Attest the Pants Pex artifact
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/src.python.pants/*.pex
- if: needs.release_info.outputs.is-release == 'true'
name: Upload Wheel and Pex
run: |
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
${{ needs.release_info.outputs.release-asset-upload-url }}?name=$PEX_FILENAME \
--data-binary "@dist/src.python.pants/$PEX_FILENAME"
WHL=$(find dist/deploy/wheels/pantsbuild.pants -type f -name "pantsbuild_pants-*.whl")
curl -L --fail \
-X POST \
-H "Authorization: Bearer ${{ github.token }}" \
-H "Content-Type: application/octet-stream" \
"${{ needs.release_info.outputs.release-asset-upload-url }}?name=$(basename $WHL)" \
--data-binary "@$WHL";
timeout-minutes: 90
publish:
env:
MODE: debug
if: github.repository_owner == 'pantsbuild' && needs.release_info.outputs.is-release == 'true'
needs:
- build_wheels_linux_x86_64
- build_wheels_linux_arm64
- build_wheels_macos13_x86_64
- build_wheels_macos14_arm64
- release_info
runs-on: ubuntu-22.04
steps:
- name: Checkout Pants at Release Tag
uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-tags: true
ref: ${{ needs.release_info.outputs.build-ref }}
- name: Set up Python 3.7, 3.8, 3.9, 3.10, 3.12, 3.13, 3.11
uses: actions/setup-python@v5
with:
python-version: |-
3.7
3.8
3.9
3.10
3.12
3.13
3.11
- name: Install Protoc
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 23.x
- name: Set rustup profile
run: rustup set profile default
- name: Cache Rust toolchain
uses: actions/cache@v4
with:
key: Linux-x86_64-rustup-${{ hashFiles('src/rust/rust-toolchain') }}-v2
path: |
~/.rustup/toolchains/1.89.0-*
~/.rustup/update-hashes
~/.rustup/settings.toml
- name: Cache Cargo
uses: Swatinem/rust-cache@v2.8.1
with:
cache-bin: 'false'
shared-key: engine
workspaces: src/rust
- id: get-engine-hash
name: Get native engine hash
run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache native engine
uses: actions/cache@v4
with:
key: Linux-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1
path: |-
src/python/pants/bin/native_client
src/python/pants/bin/sandboxer
src/python/pants/engine/internals/native_engine.so
src/python/pants/engine/internals/native_engine.so.metadata
- env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Generate announcement
run: |
./pants run src/python/pants_release/generate_release_announcement.py -- --output-dir=${{ runner.temp }}
- env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
name: Announce to Slack
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: C18RRR4JK
payload-file-path: ${{ runner.temp }}/slack_announcement.json
- name: Announce to pants-devel
uses: dawidd6/action-send-mail@v3.8.0
with:
body: file://${{ runner.temp }}/email_announcement_body.md
connection_url: ${{ secrets.EMAIL_CONNECTION_URL }}
convert_markdown: true
from: Pants Announce
secure: true
subject: file://${{ runner.temp }}/email_announcement_subject.txt
to: pants-devel@googlegroups.com
- env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY || '--DISABLED--' }}
PANTS_SHOALSOFT_OPENTELEMETRY_ENABLED: ${{ vars.OPENTELEMETRY_ENABLED || 'False' }}
name: Get release notes
run: |
./pants run src/python/pants_release/changelog.py -- "${{ needs.release_info.outputs.build-ref }}" > notes.txt
- env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
name: Publish GitHub Release
run: |
gh release edit ${{ needs.release_info.outputs.build-ref }} --draft=false --notes-file notes.txt
- env:
GH_TOKEN: ${{ secrets.WORKER_PANTS_CHEESESHOP_TRIGGER_PAT }}
name: Trigger cheeseshop build
run: |
gh api -X POST "/repos/pantsbuild/wheels.pantsbuild.org/dispatches" -F event_type=github-pages
- env:
GH_TOKEN: ${{ secrets.WORKER_PANTS_PANTSBUILD_ORG_TRIGGER_PAT }}
if: needs.release_info.outputs.is-release == 'true'
name: Trigger docs sync
run: |
RELEASE_TAG=${{ needs.release_info.outputs.build-ref }}
RELEASE_VERSION="${RELEASE_TAG#release_}"
gh workflow run sync_docs.yml -F "version=$RELEASE_VERSION" -F "reviewer=${{ github.actor }}" -R pantsbuild/pantsbuild.org
release_info:
if: github.repository_owner == 'pantsbuild'
name: Create draft release and output info
outputs:
build-ref: ${{ steps.get_info.outputs.build-ref }}
is-release: ${{ steps.get_info.outputs.is-release }}
release-asset-upload-url: ${{ steps.make_draft_release.outputs.release-asset-upload-url }}
runs-on: ubuntu-22.04
steps:
- env:
REF: ${{ github.event.inputs.ref }}
id: get_info
name: Determine ref to build
run: |
if [[ -n "$REF" ]]; then
ref="$REF"
else
ref="${GITHUB_REF#refs/tags/}"
fi
echo "build-ref=${ref}" >> $GITHUB_OUTPUT
if [[ "${ref}" =~ ^release_.+$ ]]; then
echo "is-release=true" >> $GITHUB_OUTPUT
fi
- env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
id: make_draft_release
if: github.repository_owner == 'pantsbuild' && steps.get_info.outputs.is-release == 'true'
name: Make GitHub Release
run: |
RELEASE_TAG=${{ steps.get_info.outputs.build-ref }}
RELEASE_VERSION="${RELEASE_TAG#release_}"
# NB: This could be a re-run of a release, in the event a job/step failed.
if ! gh release view $RELEASE_TAG ; then
GH_RELEASE_ARGS=("--notes" "")
GH_RELEASE_ARGS+=("--title" "$RELEASE_TAG")
if [[ $RELEASE_VERSION =~ [[:alpha:]] ]]; then
GH_RELEASE_ARGS+=("--prerelease")
GH_RELEASE_ARGS+=("--latest=false")
else
STABLE_RELEASE_TAGS=$(gh api -X GET -F per_page=100 /repos/{owner}/{repo}/releases --jq '.[].tag_name | sub("^release_"; "") | select(test("^[0-9.]+$"))')
LATEST_TAG=$(echo "$STABLE_RELEASE_TAGS $RELEASE_TAG" | tr ' ' '\n' | sort --version-sort | tail -n 1)
if [[ $RELEASE_TAG == $LATEST_TAG ]]; then
GH_RELEASE_ARGS+=("--latest=true")
else
GH_RELEASE_ARGS+=("--latest=false")
fi
fi
gh release create "$RELEASE_TAG" "${GH_RELEASE_ARGS[@]}" --draft
fi
ASSET_UPLOAD_URL=$(gh release view "$RELEASE_TAG" --json uploadUrl --jq '.uploadUrl | sub("\\{\\?.*$"; "")')
echo "release-asset-upload-url=$ASSET_UPLOAD_URL" >> $GITHUB_OUTPUT
name: Release
'on':
push:
tags:
- release_*
workflow_dispatch:
inputs:
ref:
required: true
type: string