Skip to content

Commit

Permalink
.github/workflows/dist.yml: Customize, replace pythonpublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 23, 2024
1 parent a7a25a2 commit b78c007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Build sdist (and upload to PyPI on release tags)
runs-on: ubuntu-latest
env:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
CAN_DEPLOY: ${{ secrets.PYPI_PASSWORD != '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -30,8 +30,8 @@ jobs:
name: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip_existing: true
verbose: true
if: env.CAN_DEPLOY == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand All @@ -56,7 +56,7 @@ jobs:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq
# Non-Python packages to install as spkgs
TARGETS_PRE: PyNormaliz-build-deps
TARGETS_PRE: gmp mpfr normaliz
# Disable building PyPy wheels on all platforms
# Disable musllinux until #33083 provides alpine package information
CIBW_SKIP: "pp* *-musllinux*"
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
export PATH=build/bin:$PATH
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || $(sage-print-system-package-command alpine --yes --no-install-recommends install $(sage-get-system-packages alpine $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root --enable-fat-binary && MAKE=\"make -j6\" make V=0 $TARGETS_PRE"
mkdir -p unpacked
for pkg in PyNormaliz; do
for pkg in pynormaliz; do
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg*
done
Expand All @@ -117,7 +117,7 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
env:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
CAN_DEPLOY: ${{ secrets.PYPI_PASSWORD != '' }}
steps:

- uses: actions/download-artifact@v4
Expand All @@ -129,8 +129,8 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.SAGEMATH_PYPI_API_TOKEN }}
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: wheelhouse/
skip_existing: true
verbose: true
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/pythonpublish.yml

This file was deleted.

0 comments on commit b78c007

Please sign in to comment.