Skip to content

Commit

Permalink
Updated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
perara committed Oct 18, 2024
1 parent a83e928 commit 28c2757
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 85 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/publish.yml

This file was deleted.

32 changes: 9 additions & 23 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build

on: [push, pull_request]
name: Build and Publish
on: [push, pull_request, workflow_dispatch]

jobs:
build_wheels:
Expand All @@ -13,36 +12,26 @@ jobs:
steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3


- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- name: Display vcpkg logs on failure
if: failure()
run: |
echo "vcpkg bootstrap log:"
cat ${{ github.workspace }}/.vcpkg/buildtrees/vcpkg/bootstrap-out.log || echo "Bootstrap log not found"
echo "vcpkg install log:"
find /tmp -name vcpkg-bootstrap.log -exec cat {} \; || echo "Install log not found"
shell: bash

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

publish:
pypi-publish:
name: Upload release to PyPI
needs: build_wheels
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
Expand All @@ -51,8 +40,5 @@ jobs:
path: dist
merge-multiple: true

- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 28c2757

Please sign in to comment.