Skip to content

Commit

Permalink
Use pypa/gh-action-pypi-publish to publish to pypi.org
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed May 13, 2023
1 parent 627d3e7 commit 46e5dcf
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package
name: Upload Python Package to PyPi.org

on:
release:
Expand All @@ -7,6 +7,11 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/emoji-country-flag
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -16,11 +21,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
python -m pip install --upgrade build wheel
- name: Build package
run: |
python -m build
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 46e5dcf

Please sign in to comment.