Skip to content

Commit 9e66be6

Browse files
authored
Merge pull request #66 from akhundMurad/fix/ci-cd
ci: add build-sdist command to Makefile
2 parents 90d96c3 + e65064d commit 9e66be6

File tree

4 files changed

+27
-61
lines changed

4 files changed

+27
-61
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,38 @@ on:
55
types: [published]
66

77
permissions:
8-
contents: read
8+
contents: write
99
id-token: write
1010

1111
jobs:
1212
test:
1313
uses: ./.github/workflows/test.yml
1414

15+
publish-docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v3
26+
27+
- name: Sync dependencies (locked)
28+
run: |
29+
uv sync --locked --all-groups
30+
31+
- name: Deploy to Pages
32+
run: uv run mkdocs gh-deploy --force
33+
1534
build-wheels:
1635
name: Build wheels (${{ matrix.os }})
1736
runs-on: ${{ matrix.os }}
1837
needs:
1938
- test
39+
- publish-docs
2040
strategy:
2141
fail-fast: false
2242
matrix:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ make fix-linting
155155
Build wheel and source distribution:
156156

157157
```bash
158-
make build
158+
make build-sdist
159159
```
160160

161161
This uses `uv build` under the hood.

Makefile

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,11 @@ fix-linting:
99
uv run black typeid/ tests/ --line-length 119
1010

1111

12-
# Build sdist + wheel using the configured PEP517 backend
13-
artifacts: test
14-
uv build
15-
16-
17-
clean:
18-
rm -rf dist build *.egg-info .venv
19-
20-
21-
# Ensure local dev env is ready (installs deps according to uv.lock / pyproject)
22-
prepforbuild:
23-
uv sync --all-groups
24-
25-
26-
# Alias if you still want a 'build' target name
27-
build:
28-
uv build
29-
30-
31-
test-release:
32-
uv run twine upload --repository testpypi dist/* --verbose
33-
34-
35-
release:
36-
uv run twine upload --repository pypi dist/* --verbose
12+
.PHONY: build-sdist
13+
build-sdist:
14+
@rm -rf dist build *.egg-info .venv
15+
@uv build --sdist -o dist
16+
@ls -la dist
3717

3818

3919
test:
@@ -50,4 +30,3 @@ docs:
5030

5131
docs-build:
5232
mkdocs build
53-

0 commit comments

Comments
 (0)