Skip to content

Commit

Permalink
feat: make pypi publishing optional in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthkoushik committed Jun 13, 2024
1 parent a298908 commit 796a01e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dist/pyseed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,13 @@ def main():
type: string
required: false
default: ""
publish-to-pypi:
description: >
Publish the project to PyPI. Requires a repository secret named
'PYPI_TOKEN' with a suitable API key.
type: boolean
required: false
default: true
concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -1484,6 +1491,7 @@ def main():
- run: poetry build
- run: poetry publish -u __token__ -p $PYPI_TOKEN
if: ${{ inputs.publish-to-pypi }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Expand Down
8 changes: 8 additions & 0 deletions src/data/release_new_version_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ on:
type: string
required: false
default: ""
publish-to-pypi:
description: >
Publish the project to PyPI. Requires a repository secret named
'PYPI_TOKEN' with a suitable API key.
type: boolean
required: false
default: true

concurrency:
group: ${{ github.workflow }}
Expand Down Expand Up @@ -89,6 +96,7 @@ jobs:

- run: poetry build
- run: poetry publish -u __token__ -p $PYPI_TOKEN
if: ${{ inputs.publish-to-pypi }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Expand Down

0 comments on commit 796a01e

Please sign in to comment.