Skip to content

Commit

Permalink
fail fast by doing a test pypi release
Browse files Browse the repository at this point in the history
  • Loading branch information
nreinicke committed Jan 3, 2025
1 parent fe63eda commit 8681207
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/python-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,14 @@ jobs:
env:
# 2025-01-02: cpython 3.11 requires Mac OS 10.12 at minimum
MACOSX_DEPLOYMENT_TARGET: 10.12

# CI Build Wheel Arguments
CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
CIBW_SKIP: "*-win32 *-musllinux* *i686 *ppc64le *s390x *aarch64"
CIBW_PLATFORM: ${{ matrix.platform || matrix.os }}
# CIBW_TEST_REQUIRES: "pytest"
# CIBW_TEST_COMMAND: "pytest {project}/tests -s"
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
CIBW_ARCHS_MACOS: "universal2"
# see https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2
# CIBW_TEST_SKIP: '*_universal2:arm64'
CIBW_BEFORE_BUILD: >
pip install -U maturin &&
rustup default nightly &&
Expand All @@ -99,28 +95,27 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/nrel.routee.compass
url: https://pypi.org/project/nrel.routee.compass
permissions:
id-token: write
strategy:
fail-fast: true
matrix:
os:
- ubuntu
- macos
- windows
python-version:
- "9"
- "10"
- "11"
- "12"

steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
name: "wheel-${{ matrix.os }}-py${{ matrix.python-version }}"
path: dist
merge-multiple: true
path: dist/
pattern: wheel*

- name: publish package
- run: ls -1 dist/

- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/

- name: publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true

0 comments on commit 8681207

Please sign in to comment.