diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 04fd8ace7..8e9a9fa7c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,5 @@ --- -name: "pulp-cli Publish" +name: "Publish" on: push: @@ -9,11 +9,14 @@ on: jobs: build: uses: "./.github/workflows/build.yml" - environment: "pypi" publish-pypi: name: "Publish to PyPI" needs: "build" runs-on: "ubuntu-latest" + environment: + name: "pypi" + permissions: + id-token: "write" steps: - name: "Download wheels" uses: "actions/download-artifact@v8" @@ -22,7 +25,7 @@ jobs: - name: "Install uv" uses: "astral-sh/setup-uv@v7" with: - enable-cache: true + enable-cache: false - name: "Publish" run: | uv publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bda570851..c430d6568 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ --- -name: "pulp-cli Release" +name: "Tag Release" on: workflow_dispatch: diff --git a/cookiecutter/ci/templates/macros b/cookiecutter/ci/templates/macros index b951972b5..64a0529da 100644 --- a/cookiecutter/ci/templates/macros +++ b/cookiecutter/ci/templates/macros @@ -30,11 +30,11 @@ concurrency: allow-prereleases: true {%- endmacro -%} -{%- macro install_uv() -%} +{%- macro install_uv(cache=True) -%} - name: "Install uv" uses: "astral-sh/setup-uv@v7" with: - enable-cache: true + enable-cache: {% if cache %}true{% else %}false{% endif %} {%- endmacro -%} {%- macro setup_git() -%} diff --git a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml index 7a02da183..f380fc612 100644 --- a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml +++ b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/publish.yml @@ -1,6 +1,6 @@ {%- import 'macros' as macros with context -%} --- -name: "pulp-cli Publish" +name: "Publish" on: push: @@ -10,14 +10,17 @@ on: jobs: build: uses: "./.github/workflows/build.yml" - environment: "pypi" publish-pypi: name: "Publish to PyPI" needs: "build" runs-on: "ubuntu-latest" + environment: + name: "pypi" + permissions: + id-token: "write" steps: {{ macros.download_wheels() | indent(6) }} - {{ macros.install_uv() | indent(6) }} + {{ macros.install_uv(cache=False) | indent(6) }} - name: "Publish" run: | uv publish diff --git a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/release.yml b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/release.yml index a0fe39837..165a14c3e 100644 --- a/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/release.yml +++ b/cookiecutter/ci/{{ cookiecutter.__project_name }}/.github/workflows/release.yml @@ -1,6 +1,6 @@ {%- import 'macros' as macros with context -%} --- -name: "pulp-cli Release" +name: "Tag Release" on: workflow_dispatch: