diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 4d6330b..6964142 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -3,6 +3,7 @@ name: Python on: push: branches: [ '*' ] + tags: [ '*.*.*' ] pull_request: branches: [ '*' ] @@ -98,3 +99,41 @@ jobs: with: name: ${{ runner.os }}-${{ runner.arch }}-package path: dist/legendary + + # Publishing + + pypi: + runs-on: ubuntu-latest + environment: + name: pypi + if: startsWith(github.ref, 'refs/tags/') + env: + UV_SYSTEM_PYTHON: 1 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version-file: "pyproject.toml" + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + + - name: Build + run: uv build + + - name: Publish + run: uv publish + + release: + permissions: + contents: write + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + needs: [pyinstaller, zipapp, pypi] + steps: + - name: Download builds + uses: actions/download-artifact@v8 + + \ No newline at end of file