From 4befe2f320ec53ea769b355d439543c90ffd037e Mon Sep 17 00:00:00 2001 From: Sorin Birchi Date: Sun, 25 Aug 2024 16:59:42 +0300 Subject: [PATCH] Modify publish.yaml Signed-off-by: Sorin Birchi --- .github/workflows/publish.yaml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6bfe4b9..8ee90b7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -7,17 +7,35 @@ on: pull_request: tags: - 'v*' + jobs: pypi-publish: name: upload release to PyPI runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged environment: release permissions: - # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - # retrieve your distributions here + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: List dist directory contents + run: ls -la dist - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository_url: 'https://upload.pypi.org/legacy/' \ No newline at end of file