Skip to content

Merge pull request #135 from supermihi/speed-up-ci #143

Merge pull request #135 from supermihi/speed-up-ci

Merge pull request #135 from supermihi/speed-up-ci #143

Workflow file for this run

name: build & test
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
env:
CIBW_SKIP: "*p36-* *p37-*"
CIBW_ARCHS: auto64
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: cache native build artifacts
uses: actions/cache@v4
with:
path: build
key: taglib-${{ matrix.os }}-${{ hashFiles('build_taglib.py') }}
- name: install pip dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
python -m pip install --upgrade pip build
- name: sdist (Linux)
if: ${{ runner.os == 'Linux' }}
run: python -m build --sdist
- name: upload sdist (Linux)
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' }}
with:
name: sdist
path: dist
retention-days: 5
- name: build binary wheels
uses: pypa/[email protected]
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: bdist-${{ matrix.os }}
path: ./wheelhouse/*.whl
retention-days: 5
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: download source wheel
uses: actions/download-artifact@v4
with:
name: sdist
path: wheels
- name: download binary wheels
uses: actions/download-artifact@v3
with:
pattern: bdist-*
path: wheels
merge-multiple: true
- name: publish package pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
packages-dir: wheels