From a7a61866d82a905dac15b2f84308274108f917a5 Mon Sep 17 00:00:00 2001 From: benbenbang Date: Sun, 8 Nov 2026 17:01:37 -0500 Subject: [PATCH] fix(ci): build the sdist before the manylinux wheel Reorder the release workflow so the sdist step runs before the wheel build. On runners where the manylinux container leaves dist/ root-owned and the runner cannot chown it back (seen on Blacksmith in libitofin v0.49.0, fixed there in #1397), the host-side maturin sdist fails with Permission denied. Building the sdist first creates dist/ as the runner user, and the container can still write the wheel into it afterward. This is preventive here since ubuntu-latest still chowns successfully. --- .github/workflows/semantic-release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 8a7de5a8..83407101 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -76,18 +76,18 @@ jobs: python3 -c "import re,pathlib,os; v=os.environ['VER']; p=pathlib.Path('Cargo.toml'); p.write_text(re.sub(r'(?m)^version = \"[0-9]+\.[0-9]+\.[0-9]+\"', f'version = \"{v}\"', p.read_text()))" grep -qF "version = \"${VER}\"" Cargo.toml || { echo "version sync failed: workspace version does not match ${VER}"; exit 1; } grep -E "^version" Cargo.toml - - name: build wheel - uses: PyO3/maturin-action@v1 - with: - command: build - args: --release --out dist -m crates/fmp-py/Cargo.toml - manylinux: auto - name: build sdist if: matrix.os == 'ubuntu-latest' uses: PyO3/maturin-action@v1 with: command: sdist args: --out dist -m crates/fmp-py/Cargo.toml + - name: build wheel + uses: PyO3/maturin-action@v1 + with: + command: build + args: --release --out dist -m crates/fmp-py/Cargo.toml + manylinux: auto - name: upload the built distributions uses: actions/upload-artifact@v4 with: