diff --git a/.github/workflows/ci-copier.yml b/.github/workflows/ci-copier.yml index 1362a6b..6e4c9a0 100644 --- a/.github/workflows/ci-copier.yml +++ b/.github/workflows/ci-copier.yml @@ -80,6 +80,10 @@ jobs: yq eval '.on = ["push"]' -i .github/workflows/build.yml git add .github/workflows/ci.yml .github/workflows/build.yml git commit -m "Replace actions trigger with on: [push]" + # create pixi.lock + pixi list --manifest-path pixi.toml --color=always + git add pixi.lock + git commit -m "Create pixi.lock" # Push the generated package's HEAD commit to a `ci/*` branch cid=$(git rev-parse HEAD) git push -f "${GITHUB_SERVER_URL/https:\/\//git@}:$GITHUB_REPOSITORY" $cid:refs/heads/ci/${GITHUB_SHA}-${{ matrix.minimal-python-version }} diff --git a/template/.github/workflows/build.yml b/template/.github/workflows/build.yml index aaf4b69..fe7d7ea 100644 --- a/template/.github/workflows/build.yml +++ b/template/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: environments: build - name: Build project run: pixi run -e build build-wheel + - name: Check package + run: pixi run -e build check-wheel - name: Upload package uses: actions/upload-artifact@v4 with: diff --git a/template/pixi.toml.jinja b/template/pixi.toml.jinja index a27fa78..23e1ebd 100644 --- a/template/pixi.toml.jinja +++ b/template/pixi.toml.jinja @@ -23,9 +23,11 @@ test = "pytest" test-coverage = "pytest --cov={{ project_slug_snake_case }} --cov-report=xml --cov-report=term-missing" [feature.build.dependencies] -build = "*" +python-build = "*" +twine = "*" [feature.build.tasks] build-wheel = "python -m build --no-isolation ." +check-wheel = "twine check dist/*" [feature.lint.dependencies] pre-commit = "*"