diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1902bdd..d74d7bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,16 @@ on: push: branches: - main + workflow_call: + inputs: + attest-package: + description: "Create GitHub provenance attestation for the package." + default: "false" + type: string + outputs: + artifact-name: + description: "Name of the uploaded artifact; use for artifact retrieval." + value: ${{ jobs.package.outputs.artifact-name }} # Cancel active CI runs for a PR before starting another run concurrency: @@ -27,10 +37,15 @@ jobs: tox-source: "tox" package: - name: Python Package - uses: beeware/.github/.github/workflows/python-package-create.yml@main + name: Package gbulb + permissions: + id-token: write + contents: read + attestations: write +# uses: beeware/.github/.github/workflows/python-package-create.yml@main + uses: rmartin16/.github-beeware/.github/workflows/python-package-create.yml@hynek-build with: - tox-source: "tox" + attest: ${{ inputs.attest-package }} python-versions: name: Python compatibility test @@ -47,22 +62,30 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.1.6 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5.1.0 with: python-version: ${{ matrix.python-version }} - - name: Install system dependencies + - name: Get Packages + uses: actions/download-artifact@v4.1.7 + with: + name: ${{ needs.package.outputs.artifact-name }} + path: dist + + - name: Install System Dependencies run: | sudo apt update -y sudo apt install -y pkg-config python3-dev libgirepository1.0-dev gir1.2-gtk-3.0 - name: Install Tox - run: | - # We don't actually want to install gbulb; we just want the dev extras - # so that we have a known version of coverage - python -m pip install -e .[dev] + uses: beeware/.github/.github/actions/install-requirement@main + with: + requirements: tox + extra: dev - name: Test - run: tox -e py + run: tox -e py --installpkg dist/gbulb-*.whl diff --git a/changes/148.misc.rst b/changes/148.misc.rst new file mode 100644 index 0000000..3f31ce7 --- /dev/null +++ b/changes/148.misc.rst @@ -0,0 +1 @@ +``hynek/build-and-inspect-python-package`` is now used to create the Python package. diff --git a/tox.ini b/tox.ini index 34363ee..e6490db 100644 --- a/tox.ini +++ b/tox.ini @@ -33,13 +33,3 @@ deps = commands = check : python -m towncrier.check --compare-with origin/main !check : python -m towncrier {posargs} - -[testenv:package] -skip_install = True -passenv = FORCE_COLOR -deps = - build==1.2.1 - twine==5.1.0 -commands = - python -m build . --outdir dist/ - python -m twine check dist/*