Skip to content

Commit

Permalink
only publish on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpops committed Apr 26, 2023
1 parent d196c50 commit e0ae565
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Run Tests and upload to pypi

on:
push:
branches: [ main ]
branches:
- main
tags:
- "v*"

jobs:
tests:
Expand All @@ -19,7 +22,6 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Upload release to PyPI
needs: [tests] # require tests to pass before deploy runs
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ name: Run Tests

on:
pull_request:
branches: [ main ]
branches:
- main
workflow_call:
push:
branches:
- main

jobs:
test:
Expand Down

0 comments on commit e0ae565

Please sign in to comment.