Skip to content

Commit 22b3942

Browse files
committed
Refactor CD workflow to replace all 'make' commands with 'uv run' commands for improved consistency and performance
1 parent 48c7d1e commit 22b3942

1 file changed

Lines changed: 34 additions & 39 deletions

File tree

.github/workflows/cd.yml

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ concurrency:
1414
group: "pages"
1515
cancel-in-progress: true
1616

17+
env:
18+
VERSION: ${{ github.event.release.tag_name }}
19+
UV_LINK_MODE: copy
20+
UV_NATIVE_TLS: true
21+
UV_NO_SYNC: true
22+
1723
jobs:
1824

1925
debug:
@@ -123,30 +129,26 @@ jobs:
123129
with:
124130
python-version: '3.13'
125131

132+
- name: Install dependencies
133+
id: install-dependencies
134+
run: uv sync --no-cache --all-groups
135+
126136
- name: Set up Git
127137
id: setup-git
128138
env:
129139
GITHUB_ACTOR: ${{ github.actor }}
130140
run: |
131-
make configure-git
132-
make git-switch-to-main-branch
133-
make git-refresh-current-branch
134-
135-
- name: Install dependencies
136-
id: install-dependencies
137-
run: uv sync --no-cache --all-groups
141+
uv run add-git-credentials
142+
uv run git-switch-to-main-branch
143+
uv run git-refresh-current-branch
138144
139145
- name: Run checks
140146
id: run-checks
141147
run: uv run check
142148

143-
- name: Copy coverage report
144-
id: copy-coverage-report
145-
run: make copy-coverage-report
146-
147-
- name: Commit coverage report
148-
id: commit-coverage-report
149-
run: make commit-coverage-report
149+
- name: Add coverage report
150+
id: add-coverage-report
151+
run: uv run git-add-coverage-report
150152

151153
- name: Upload coverage
152154
id: upload-coverage
@@ -185,8 +187,6 @@ jobs:
185187

186188
- name: Check VERSION
187189
id: check-version
188-
env:
189-
VERSION: ${{ github.event.release.tag_name }}
190190
run: |
191191
if [ -z "${VERSION}" ]; then
192192
echo "/$VERSION is missing. Please try again."
@@ -198,28 +198,26 @@ jobs:
198198

199199
- name: Setup Git
200200
id: setup-git
201-
env:
202-
GITHUB_ACTOR: ${{ github.actor }}
203201
run: |
204-
make configure-git
205-
make git-switch-to-main-branch
206-
make git-refresh-current-branch
202+
uv run add-git-credentials
203+
uv run git-switch-to-main-branch
204+
uv run git-refresh-current-branch
207205
208206
- name: Bump version
209207
id: bump-version
210-
env:
211-
VERSION: ${{ github.event.release.tag_name }}
212-
run: make bump-version
208+
run: uv run bump-version --verbose=true version=${VERSION}
213209

214-
- name: Update Git
215-
id: update-git
216-
env:
217-
VERSION: ${{ github.event.release.tag_name }}
218-
run: make update-git
210+
- name: Update Git Version
211+
id: update-git-version
212+
run: uv run git-update-version
213+
214+
- name: Fix tag reference
215+
id: fix-tag-reference
216+
run: uv run git-fix-tag-reference
219217

220218
- name: Build package
221219
id: build-package
222-
run: make build-package
220+
run: uv build --out-dir=dist
223221

224222
- name: Upload assets
225223
id: upload-assets
@@ -270,7 +268,7 @@ jobs:
270268
id: publish-package
271269
env:
272270
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
273-
run: make publish-package
271+
run: uv publish --token ${PYPI_TOKEN}
274272

275273
- name: Check
276274
id: check
@@ -343,20 +341,17 @@ jobs:
343341

344342
- name: Install dependencies
345343
id: install-dependencies
346-
run: make install-docs
344+
run: uv sync --group=docs
347345

348346
- name: Setup Git
349347
id: setup-git
350348
env:
351349
GITHUB_ACTOR: ${{ github.actor }}
352350
run: |
353-
make configure-git
354-
make git-switch-to-main-branch
355-
make git-refresh-current-branch
351+
uv run add-git-credentials
352+
uv run git-switch-to-main-branch
353+
uv run git-refresh-current-branch
356354
357355
- name: Build docs
358356
id: build-docs
359-
env:
360-
VERSION: ${{ github.event.release.tag_name }}
361-
GITHUB_ACTOR: ${{ github.actor }}
362-
run: make build-versioned-docs
357+
run: uv run build-versioned-docs

0 commit comments

Comments
 (0)