Skip to content

Commit

Permalink
Split out a "publish" job
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelm committed Dec 27, 2021
1 parent 8608429 commit 048832d
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
fetch-depth: 0 # required for setuptools_scm
- name: Build sdist and temporary wheel
run: pipx run build
- uses: actions/upload-artifact@v2
with:
name: sdist
path: dist/*.tar.gz

test:
timeout-minutes: 10
Expand All @@ -55,32 +59,41 @@ jobs:
- name: Upload coverage report
uses: codecov/codecov-action@v1

publish:
wheels:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [lint, build, test]
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for setuptools_scm
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.2
with:
output-dir: dist/
env:
CIBW_BUILD: "cp3*-manylinux_x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_ENVIRONMENT: "CFLAGS=-g0"
CIBW_TEST_COMMAND: "cutadapt --help"
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*.whl

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [build, wheels]
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: sdist
path: dist/
- uses: actions/download-artifact@v2
with:
python-version: 3.7
- name: Make sdist
run: |
pipx run build --sdist
ls -l dist/
name: wheels
path: dist/
- name: Publish dev release to test PyPI
if: contains(github.ref, '.dev')
uses: pypa/gh-action-pypi-publish@v1.4.2
Expand Down

0 comments on commit 048832d

Please sign in to comment.