Skip to content

Commit

Permalink
add push to pypi as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Dec 16, 2023
1 parent a218529 commit 4bccff9
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:

Continuous-Deployment:
needs: Continuous-Integration
if: github.ref == 'refs/heads/main' # github.event_name == 'push' &&

# if pulling to main, deploy to PyPI
if: github.ref == 'refs/heads/main'

# Set up operating system
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,14 +76,21 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# - name: Use Python Semantic Release to prepare release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# git config user.name github-actions
# git config user.email github-actions@github.com
# poetry run semantic-release publish
- name: Publish package distributions to PyPI
id: pypi-publish

if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
Expand Down

0 comments on commit 4bccff9

Please sign in to comment.