FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Build and check packages in CI and publish workflows by rytilahti · Pull Request #1782 · python-kasa/python-kasa · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yaml  (1) .yml  (2) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
14 changes: 14 additions & 0 deletions .github/actions/build-packages/action.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build Packages
description: Build the release packages into dist/ and verify their metadata
runs:
using: composite
steps:
- name: Build Packages
id: build-packages
shell: bash
run: uv build --build-constraints .github/build-constraints.txt

- name: Check Packages
id: check-packages
shell: bash
run: uvx --with packaging==26.2 twine==7.0.0 check --strict dist/*
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
run: |
uv run pre-commit run --all-files --verbose

# Build the same way as publish.yml to catch packaging issues before a release is tagged.
- name: Build and Check Packages
id: build-packages
uses: ./.github/actions/build-packages

tests:
name: Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }}
needs: lint
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
version-file: uv.lock
python-version: ${{ env.PYTHON_VERSION }}

- name: Build Packages
- name: Build and Check Packages
id: build-packages
shell: bash
run: uv build --build-constraints .github/build-constraints.txt
uses: ./.github/actions/build-packages

- name: Publish Release on PyPI
id: publish-release-on-pypi
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
with:
# Metadata is already verified by the build action, same as in CI.
verify-metadata: false
Loading

Back | FazBrowse Home | New Git URL