Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #148 from rmartin16/attest-package
Browse files Browse the repository at this point in the history
Use new create package action
  • Loading branch information
freakboy3742 authored May 30, 2024
2 parents 716f507 + 4cd2372 commit 12a85ec
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,10 +37,14 @@ jobs:
tox-source: "tox"

package:
name: Python Package
name: Package gbulb
permissions:
id-token: write
contents: read
attestations: write
uses: beeware/.github/.github/workflows/python-package-create.yml@main
with:
tox-source: "tox"
attest: ${{ inputs.attest-package }}

python-versions:
name: Python compatibility test
Expand All @@ -47,22 +61,30 @@ jobs:
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
- name: Get Packages
uses: actions/[email protected]
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
1 change: 1 addition & 0 deletions changes/148.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``hynek/build-and-inspect-python-package`` is now used to create the Python package.
10 changes: 0 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

0 comments on commit 12a85ec

Please sign in to comment.