Skip to content

Commit

Permalink
Updates GitHub Action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gremid committed Sep 27, 2024
1 parent 0c16fbd commit c92f724
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Package

on:
workflow_dispatch:
Expand All @@ -16,47 +16,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build sdist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheel:
name: Build binary distribution
build_wheels:
name: Build binary distribution on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: auto universal2
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: wheelhouse/*.whl
deploy:
name: Upload to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
needs: [build_sdist, build_wheel]
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
- uses: actions/download-artifact@v4
with:
name: artifact
python-version: "3.x"
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: Test

on:
workflow_dispatch:
Expand All @@ -12,8 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
#platform: [windows-latest, macos-latest, ubuntu-latest]
platform: [macos-latest, ubuntu-latest]
platform: [windows-latest, macos-13, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

runs-on: ${{ matrix.platform }}
Expand Down

0 comments on commit c92f724

Please sign in to comment.