Skip to content

Commit 368d300

Browse files
committed
ci: publish wheels only for public releases
1 parent e3f44c3 commit 368d300

1 file changed

Lines changed: 4 additions & 37 deletions

File tree

.github/workflows/CI.yml

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -166,44 +166,11 @@ jobs:
166166
name: wheels-macos-aarch64-py${{ matrix.python-version }}
167167
path: dist
168168

169-
# ------------------------------------------------------------------
170-
# Source distribution (sdist) -- pure Python, no Rust needed
171-
# ------------------------------------------------------------------
172-
sdist:
173-
name: sdist
174-
runs-on: ubuntu-latest
175-
steps:
176-
- uses: actions/checkout@v4
177-
178-
- name: Inject Rust source (needed by maturin sdist to embed Cargo.toml)
179-
env:
180-
PART1: ${{ secrets.RUST_SRC_B64_1 }}
181-
PART2: ${{ secrets.RUST_SRC_B64_2 }}
182-
PART3: ${{ secrets.RUST_SRC_B64_3 }}
183-
run: |
184-
if [ -z "$PART1" ]; then
185-
echo "SKIP_BUILD=1" >> "$GITHUB_ENV"
186-
else
187-
echo "${PART1}${PART2}${PART3}" | base64 -d | tar -xzf - -C .
188-
echo "SKIP_BUILD=0" >> "$GITHUB_ENV"
189-
fi
190-
191-
- name: Build sdist
192-
if: env.SKIP_BUILD == '0'
193-
uses: PyO3/maturin-action@v1
194-
with:
195-
command: sdist
196-
args: --out dist
197-
198-
- uses: actions/upload-artifact@v4
199-
if: env.SKIP_BUILD == '0'
200-
with:
201-
name: wheels-sdist
202-
path: dist
203-
204169
# ------------------------------------------------------------------
205170
# Publish to PyPI via OIDC Trusted Publisher (no token required)
206-
# Runs only on version tags pushed to the main repo (not forks)
171+
# Runs only on version tags pushed to the main repo (not forks).
172+
# Public releases are wheel-only to prevent unsupported interpreters from
173+
# falling back to a source build without the proprietary Rust core.
207174
# ------------------------------------------------------------------
208175
release:
209176
name: publish-to-pypi
@@ -212,7 +179,7 @@ jobs:
212179
startsWith(github.ref, 'refs/tags/v') &&
213180
github.repository == 'GuillaumeLessard/qector-decoder' &&
214181
github.event_name != 'pull_request'
215-
needs: [linux-x86_64, windows-x64, macos-arm, sdist]
182+
needs: [linux-x86_64, windows-x64, macos-arm]
216183
environment: pypi
217184
permissions:
218185
id-token: write

0 commit comments

Comments
 (0)