Skip to content

Commit

Permalink
revised workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwoods2 committed Jul 20, 2024
1 parent a478ce2 commit 426c757
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# On PR or push to package-* branch, build wheels and src dists
# On tag with version number, build wheels and src dists and upload to testpypi
# On release, build wheels and src dists and upload to pypi

name: Build and upload to PyPI

on:
Expand Down Expand Up @@ -26,6 +30,7 @@ defaults:
jobs:
build_wheels:
name: Build wheels
if: github.repository == 'Becksteinlab/zarrtraj'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -44,7 +49,12 @@ jobs:
- name: Build wheel
run: |
pip wheel --no-deps . -w wheelhouse/
- name: Print directory contents
run: |
echo "Contents of the dist directory:"
ls -l dist
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -53,6 +63,7 @@ jobs:

build_sdist:
name: build package source distribution
if: github.repository == 'Becksteinlab/zarrtraj'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -74,6 +85,9 @@ jobs:

upload_testpypi_zarrtraj:
name: testpypi_upload_zarrtraj
if: |
github.repository == 'Becksteinlab/zarrtraj' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
environment:
name: publisher
url: https://test.pypi.org/p/zarrtraj
Expand Down Expand Up @@ -107,6 +121,9 @@ jobs:

upload_pypi_zarrtraj:
name: pypi_upload_zarrtraj
if: |
github.repository == 'Becksteinlab/zarrtraj' &&
github.event_name == 'release' && github.event.action == 'published'
environment:
name: publisher
url: https://pypi.org/p/zarrtraj
Expand Down

0 comments on commit 426c757

Please sign in to comment.