Skip to content

Commit

Permalink
split up workflows to make checks easier
Browse files Browse the repository at this point in the history
  • Loading branch information
jessdtate committed Sep 20, 2023
1 parent 3ed3456 commit 296a47e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 36 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pypackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Test Package
on: push

jobs:
build-wheel:
name: build wheel for testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: install check-wheel-contents
run: >-
python3 -m
pip install
check-wheel-contents
- name: check wheel
run: >-
check-wheel-contents
dist/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./dist/*

40 changes: 4 additions & 36 deletions .github/workflows/pypublish.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,10 @@
name: Publish Python distribution to PyPI and TestPyPI
on: push
on:
push:
tags:
- '*'

jobs:
build-wheel:
name: build wheel for testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: install check-wheel-contents
run: >-
python3 -m
pip install
check-wheel-contents
- name: check wheel
run: >-
check-wheel-contents
dist/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./dist/*

upload_pypi:
needs: build-wheel
name: Publish build to TestPyPI and PyPI
Expand Down

0 comments on commit 296a47e

Please sign in to comment.