Skip to content

Commit 7e8e52e

Browse files
committed
update publish workflow to use pinned versions of dependencies in uv.lock during build
1 parent 80e6087 commit 7e8e52e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ jobs:
3232
- name: Set up Python
3333
run: uv python install
3434

35-
- name: Install the project
36-
run: uv sync --all-extras --dev
37-
3835
- name: Build the project
3936
run: |
40-
version=${{ github.ref_name }}
41-
version=${version#v}
42-
export SETUPTOOLS_SCM_PRETEND_VERSION=$version
37+
# from https://github.com/astral-sh/uv/issues/8729#issuecomment-2654619679
38+
uv lock --check
39+
cp pyproject.toml pyproject.toml.bak
40+
cp uv.lock uv.lock.bak
41+
uv export --locked --no-dev --no-extra pinned --no-hashes --no-emit-workspace --output-file pinned_requirements.txt > /dev/null
42+
uv add --optional pinned -r pinned_requirements.txt
4343
uv build
44+
mv pyproject.toml.bak pyproject.toml
45+
mv uv.lock.bak uv.lock
46+
rm -f pinned_requirements.txt
4447
4548
- name: Publish distribution
4649
run: uv publish

0 commit comments

Comments
 (0)