diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9256150cd..04fd8ace7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,29 +9,21 @@ on: jobs: build: uses: "./.github/workflows/build.yml" + environment: "pypi" publish-pypi: name: "Publish to PyPI" needs: "build" runs-on: "ubuntu-latest" steps: - - name: "Checkout" - uses: "actions/checkout@v6" - name: "Download wheels" uses: "actions/download-artifact@v8" with: name: "pulp_cli_packages" - - name: "Set up Python" - uses: "actions/setup-python@v6" - with: - python-version: "3.14" - allow-prereleases: true - name: "Install uv" uses: "astral-sh/setup-uv@v7" with: enable-cache: true - name: "Publish" - env: - UV_PUBLISH_TOKEN: "${{ secrets.PYPI_API_TOKEN }}" run: | uv publish ... diff --git a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml index 694cde045..7a02da183 100644 --- a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml +++ b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml @@ -10,20 +10,15 @@ on: jobs: build: uses: "./.github/workflows/build.yml" + environment: "pypi" publish-pypi: name: "Publish to PyPI" needs: "build" runs-on: "ubuntu-latest" steps: - {{ macros.checkout() | indent(6) }} {{ macros.download_wheels() | indent(6) }} - {{ macros.setup_python() | indent(6) }} {{ macros.install_uv() | indent(6) }} - name: "Publish" - env: - {%- raw %} - UV_PUBLISH_TOKEN: "${{ secrets.PYPI_API_TOKEN }}" - {%- endraw %} run: | uv publish ...