Skip to content

Commit

Permalink
ci: turn sdist into separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
supermihi committed Mar 17, 2024
1 parent ccd86c9 commit fcfd3dd
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,40 @@ 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
sdist:
runs-on: ubuntu-latest
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' }}
- name: install pip dependencies
run: |
python -m pip install --upgrade pip build
- name: sdist (Linux)
if: ${{ runner.os == 'Linux' }}
- name: sdist
run: python -m build --sdist
- name: upload sdist (Linux)
- name: upload sdist
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Linux' }}
with:
name: sdist
path: dist
retention-days: 5
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: cache native build artifacts
uses: actions/cache@v4
with:
path: build
key: taglib-${{ matrix.os }}-${{ hashFiles('build_taglib.py') }}
- name: build binary wheels
uses: pypa/[email protected]
- name: upload wheels
Expand All @@ -46,7 +47,7 @@ jobs:
retention-days: 5
publish:
runs-on: ubuntu-latest
needs: build
needs: [build, sdist]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: download source wheel
Expand Down

0 comments on commit fcfd3dd

Please sign in to comment.