From a5c9fb355a7de10fea09b28582c9b98475a8bd14 Mon Sep 17 00:00:00 2001 From: cvzi Date: Wed, 19 Jun 2024 21:46:52 +0200 Subject: [PATCH] Fix upload to PyPi --- .github/workflows/pypipublish.yml | 33 ++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pypipublish.yml b/.github/workflows/pypipublish.yml index 771a508..eb102e9 100644 --- a/.github/workflows/pypipublish.yml +++ b/.github/workflows/pypipublish.yml @@ -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