From 8c7d79aae5fc57f56a744a69dbb11cf87ff22523 Mon Sep 17 00:00:00 2001 From: Murad Akhundov Date: Sat, 3 Jan 2026 16:43:47 +0100 Subject: [PATCH 1/2] ci: add build-sdist command to Makefile --- .github/workflows/docs.yml | 33 --------------------------------- .github/workflows/publish.yml | 22 +++++++++++++++++++++- CONTRIBUTING.md | 2 +- Makefile | 22 +++++----------------- 4 files changed, 27 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index ddf103f..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Publish Docs - -on: - release: - types: [published] - workflow_call: - -permissions: - contents: write - -jobs: - test: - uses: ./.github/workflows/test.yml - - deploy: - runs-on: ubuntu-latest - needs: test - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install uv - uses: astral-sh/setup-uv@v3 - - - name: Sync dependencies (locked) - run: | - uv sync --locked --all-groups - - - name: Deploy - run: uv run mkdocs gh-deploy --force diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3e87ef1..5cfd3e1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,18 +5,38 @@ on: types: [published] permissions: - contents: read + contents: write id-token: write jobs: test: uses: ./.github/workflows/test.yml + publish-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Sync dependencies (locked) + run: | + uv sync --locked --all-groups + + - name: Deploy to Pages + run: uv run mkdocs gh-deploy --force + build-wheels: name: Build wheels (${{ matrix.os }}) runs-on: ${{ matrix.os }} needs: - test + - publish-docs strategy: fail-fast: false matrix: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6bbcebf..11ab56d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -155,7 +155,7 @@ make fix-linting Build wheel and source distribution: ```bash -make build +make build-sdist ``` This uses `uv build` under the hood. diff --git a/Makefile b/Makefile index 4a053fc..73d8e64 100644 --- a/Makefile +++ b/Makefile @@ -9,23 +9,11 @@ fix-linting: uv run black typeid/ tests/ --line-length 119 -# Build sdist + wheel using the configured PEP517 backend -artifacts: test - uv build - - -clean: - rm -rf dist build *.egg-info .venv - - -# Ensure local dev env is ready (installs deps according to uv.lock / pyproject) -prepforbuild: - uv sync --all-groups - - -# Alias if you still want a 'build' target name -build: - uv build +.PHONY: build-sdist +build-sdist: + @rm -rf dist build *.egg-info .venv + @uv build --sdist -o dist + @ls -la dist test-release: From e65064d92386abe928a2fd7adcd807f118d28c67 Mon Sep 17 00:00:00 2001 From: Murad Akhundov Date: Sat, 3 Jan 2026 16:46:40 +0100 Subject: [PATCH 2/2] ci: remove "release" and "test-release" commands from Makefile --- Makefile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Makefile b/Makefile index 73d8e64..0efddaf 100644 --- a/Makefile +++ b/Makefile @@ -16,14 +16,6 @@ build-sdist: @ls -la dist -test-release: - uv run twine upload --repository testpypi dist/* --verbose - - -release: - uv run twine upload --repository pypi dist/* --verbose - - test: uv run pytest -v @@ -38,4 +30,3 @@ docs: docs-build: mkdocs build -