Skip to content

Commit

Permalink
Merge pull request #128 from DemocracyClub/hotfix/conditional-releases
Browse files Browse the repository at this point in the history
Fix conditional statement for release
  • Loading branch information
VirginiaDooley authored Apr 16, 2024
2 parents fc48d92 + 481d955 commit dafa78d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Publish Python Package

on:
release:
types: [created]
workflow_run:
workflows: ["Run Tests"]
workflows: ["Run Tests"]
types:
- completed
branches:
- master
if: ${{ github.event.workflow_run.conclusion == 'success' }}

release:
types: [created]

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -31,6 +29,7 @@ jobs:
pip install --upgrade pip
pip install -e '.[test]'
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
needs: [test]
environment: release
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: pytest

0 comments on commit dafa78d

Please sign in to comment.