Skip to content

Commit

Permalink
💚 Fix github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 7, 2024
1 parent 6826085 commit 53d1b0a
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

env:
CMAKE_GENERATOR: Ninja
PYTHONUTF8: "1"
files: dist/*
python-version: 3.x
cache: pip

Expand All @@ -25,57 +25,61 @@ jobs:
matrix:
include:
- runs-on: ubuntu-latest
CIBW_SKIP: "*-manylinux_*"
skip: "manylinux"
- runs-on: ubuntu-latest
CIBW_SKIP: "*-musllinux_*"
skip: "musllinux"
- runs-on: macos-latest
CIBW_SKIP: ""
skip: ""
- runs-on: windows-latest
CIBW_SKIP: ""
runs-on: ${{ matrix.runs-on }}
skip: ""
runs-on: ${{matrix.runs-on}}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
if: runner.os == 'Linux'
- uses: pypa/cibuildwheel@v2.16
env:
CIBW_SKIP: ${{ matrix.CIBW_SKIP }}
CIBW_SKIP: "*-${{matrix.skip}}_*"
- uses: actions/upload-artifact@v4
with:
name: artifact-${{matrix.runs-on}}-${{matrix.skip}}
path: |
wheelhouse/*.whl
build-sdist:
build:
needs:
- build-wheels-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
cache: ${{ env.cache }}
python-version: ${{env.python-version}}
cache: ${{env.cache}}
- name: Install dependencies
run: |
pip install build
- name: Build sdist
run: python -m build -s
run: |
pyproject-build -s
- uses: actions/upload-artifact@v4
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
if: "! startsWith(github.ref, 'refs/tags/')"
with:
name: artifact-sdist
path: |
dist/*
${{env.files}}
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: artifact-*
merge-multiple: true
path: dist
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: build/CHANGELOG.md
files: |
dist/*
${{env.files}}
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
with:
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{secrets.PYPI_API_TOKEN}}

0 comments on commit 53d1b0a

Please sign in to comment.