Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 33 additions & 24 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish bdkpython to PyPI
on: [workflow_dispatch]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
PIP_NO_CACHE_DIR: "1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that only for pip, or does it also affect uv? Wondering if we need it (Claude thinks we don't but it also had wrong ideas about the non-existence of the artifact-metadata permission, which totally exists 😆. You also already disable the cache on the astral-sh/setup-uv@v7 action below, so I think that's covered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is strictly related to pip 26.1+ bug with its HTTP cache. removing it produces WARNING: Cache entry deserialization failed, entry ignored. you can get more info on issue (pypa/pip#13979).


permissions: {}

Expand All @@ -21,7 +24,7 @@ jobs:
- cp313-cp313
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
Expand All @@ -32,6 +35,8 @@ jobs:

- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -44,7 +49,7 @@ jobs:
# see issue #350 for more information
run: UV_PYTHON=${PYBIN}/python uv build --wheel --config-setting=--build-option=--plat-name=manylinux_2_28_x86_64 --verbose

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v7
with:
name: bdkpython-manylinux_2_28_x86_64-${{ matrix.python }}
path: dist/*.whl
Expand All @@ -61,19 +66,21 @@ jobs:
- "3.13"
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
fetch-depth: 0

- name: "Install Python"
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -87,7 +94,7 @@ jobs:
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_arm64 --verbose

- name: "Upload artifacts"
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: bdkpython-macos-arm64-${{ matrix.python }}
path: dist/*.whl
Expand All @@ -104,19 +111,21 @@ jobs:
- "3.13"
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
fetch-depth: 0

- name: "Install Python"
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -129,7 +138,7 @@ jobs:
# see issue #350 for more information
run: uv build --wheel --config-setting=--build-option=--plat-name=macosx_11_0_x86_64 --verbose

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v7
with:
name: bdkpython-macos-x86_64-${{ matrix.python }}
path: dist/*.whl
Expand All @@ -146,18 +155,20 @@ jobs:
- "3.13"
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
fetch-depth: 0

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}

- name: "Install uv"
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -169,7 +180,7 @@ jobs:
run: uv build --wheel --verbose

- name: "Upload artifacts"
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: bdkpython-win-${{ matrix.python }}
path: dist/*.whl
Expand All @@ -178,28 +189,26 @@ jobs:
name: "Publish on PyPI"
runs-on: ubuntu-24.04
needs: [build-manylinux_2_28-x86_64-wheels, build-macos-arm64-wheels, build-macos-x86_64-wheels, build-windows-wheels]
environment:
name: pypi
url: https://pypi.org/project/bdkpython/
permissions:
id-token: write
contents: read
attestations: write
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false

- name: "Download artifacts in dist/ directory"
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
path: dist/

# - name: "Publish on test PyPI"
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# packages_dir: dist/*/
merge-multiple: true

- name: "Publish on PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/*/
packages-dir: dist/
Loading