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..0efddaf 100644 --- a/Makefile +++ b/Makefile @@ -9,31 +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 - - -test-release: - uv run twine upload --repository testpypi dist/* --verbose - - -release: - uv run twine upload --repository pypi dist/* --verbose +.PHONY: build-sdist +build-sdist: + @rm -rf dist build *.egg-info .venv + @uv build --sdist -o dist + @ls -la dist test: @@ -50,4 +30,3 @@ docs: docs-build: mkdocs build -