Skip to content

Commit

Permalink
Try better
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpops committed Apr 26, 2023
1 parent 0ae11c3 commit 9b87e03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
name: Run Tests and upload to pypi

on:
push:
pull_request:
branches:
- main
workflow_run:
workflows:
- "Run Tests"
push:
branches:
- main
types:
- completed

jobs:
tests:
uses: ./.github/workflows/test.yaml
debug:
runs-on: ubuntu-latest
steps:
Expand All @@ -25,9 +23,9 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
pypi-publish:
if: github.event_name == 'push'
name: Upload release to PyPI
#needs: [tests] # require tests to pass before deploy runs
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: [tests] # require tests to pass before deploy runs
runs-on: ubuntu-latest
environment:
name: pypi
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Run Tests

on:
pull_request:
branches:
- main
# pull_request:
# branches:
# - main
workflow_call:
push:
branches:
- main

jobs:
test:
Expand Down

0 comments on commit 9b87e03

Please sign in to comment.