Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Fix PyPI publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sarlinpe committed Jan 3, 2022
1 parent 81319a2 commit c68fe06
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/build-new.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pybind11 CI
name: PyCOLMAP build and publish

on:
push:
Expand Down Expand Up @@ -38,15 +38,6 @@ jobs:
# we strip the version number from the artifact name
name: pycolmap-${{ matrix.pyversion }}-manylinux2014_x86_64
path: wheelhouse/pycolmap-*-${{ matrix.pyversion }}-manylinux2014_x86_64.whl
- name: Publish package
# We publish the wheel to pypi when a new tag is pushed,
# either by creating a new GitHub release or explictly with `git tag`
if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: wheelhouse/

mac-build:
name: Wrapper macOS Build
Expand All @@ -68,10 +59,24 @@ jobs:
with:
name: pycolmap-${{ matrix.pyversion }}-${{ matrix.os }}
path: ./wheelhouse/pycolmap-*.whl

pypi-publish:
name: Publish wheels to PyPI
needs: [linux-build, mac-build]
runs-on: ubuntu-latest
# We publish the wheel to pypi when a new tag is pushed,
# either by creating a new GitHub release or explictly with `git tag`
if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }}
steps:
- name: Download wheels
uses: actions/download-artifact@v2
with:
path: ./artifacts/
- name: Move wheels
run: mkdir ./wheelhouse && mv ./artifacts/**/*.whl ./wheelhouse/
- name: Publish package
if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: wheelhouse/
packages_dir: ./wheelhouse/

0 comments on commit c68fe06

Please sign in to comment.