diff --git a/docs/pages/guides/gha_pure.md b/docs/pages/guides/gha_pure.md index d6cca353..582d28d1 100644 --- a/docs/pages/guides/gha_pure.md +++ b/docs/pages/guides/gha_pure.md @@ -123,7 +123,7 @@ later in the upload action for the release job, as well). > ``` > > The artifact it produces is named `Packages`, so that's what you need to use -> later to publish. +> later to publish. This will be used instead of the manual steps below. And then, you need a release job: @@ -201,6 +201,7 @@ name: CD on: workflow_dispatch: + pull_request: push: branches: - main @@ -229,7 +230,7 @@ jobs: steps: - uses: actions/download-artifact@v3 with: - name: artifact + name: Packages path: dist - uses: pypa/gh-action-pypi-publish@release/v1 @@ -246,6 +247,7 @@ name: CD on: workflow_dispatch: + pull_request: push: branches: - main diff --git a/{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type!='compiled' %}cd.yml{% endif %} b/{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type!='compiled' %}cd.yml{% endif %} index 7c8cb433..9cdc3f98 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type!='compiled' %}cd.yml{% endif %} +++ b/{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type!='compiled' %}cd.yml{% endif %} @@ -27,15 +27,7 @@ jobs: with: fetch-depth: 0 - - name: Build sdist and wheel - run: pipx run build - - - uses: actions/upload-artifact@v3 - with: - path: dist - - - name: Check products - run: pipx run twine check dist/* + - uses: hynek/build-and-inspect-python-package@v1 publish: needs: [dist] @@ -49,7 +41,7 @@ jobs: steps: - uses: actions/download-artifact@v3 with: - name: artifact + name: Packages path: dist - uses: pypa/gh-action-pypi-publish@release/v1