Skip to content

Commit

Permalink
Fix upload to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Jun 19, 2024
1 parent 95d56c8 commit a5c9fb3
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/pypipublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,32 @@ on:
types: [published]

jobs:
deploy:
build-package:
name: Build & verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
with:
attest-build-provenance-github: 'true'

deploy:
name: Publish to pypi.org
environment:
name: pypi
url: https://pypi.org/p/emoji-country-flag
runs-on: ubuntu-latest
needs: build-package
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v2.5.0
with:
attest-build-provenance-github: 'true'
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.14
- name: Download package built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0

0 comments on commit a5c9fb3

Please sign in to comment.