Skip to content

Commit fd1c177

Browse files
committed
chore: update release workflow
1 parent db8b118 commit fd1c177

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,33 @@ jobs:
2121
with:
2222
python-version: "3.10"
2323

24-
- name: Upgrade pip
24+
- name: Install uv
2525
run: |
26-
pip install --constraint=.github/workflows/constraints.txt pip
27-
pip --version
28-
29-
- name: Install Poetry
30-
run: |
31-
pip install --constraint=.github/workflows/constraints.txt poetry
32-
poetry --version
26+
pip install uv==0.7.13
3327
3428
- name: Check if there is a parent commit
3529
id: check-parent-commit
3630
run: |
37-
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
31+
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> "$GITHUB_OUTPUT"
3832
3933
- name: Detect and tag new version
4034
id: check-version
4135
if: steps.check-parent-commit.outputs.sha
4236
uses: salsify/action-detect-and-tag-new-version@v2.0.1
4337
with:
4438
version-command: |
45-
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
39+
bash -o pipefail -c "grep '^version =' pyproject.toml | sed -E 's/version = \"(.+)\"/\1/'"
4640
4741
- name: Bump version for developmental release
4842
if: "! steps.check-version.outputs.tag"
4943
run: |
50-
poetry version patch &&
51-
version=$(poetry version | awk '{ print $2 }') &&
52-
poetry version $version.dev.$(date +%s)
44+
current_version=$(grep '^version =' pyproject.toml | sed -E 's/version = \"(.+)\"/\1/')
45+
new_version="${current_version}.dev.$(date +%s)"
46+
sed -i "s/^version = \".*\"/version = \"$new_version\"/" pyproject.toml
5347
54-
- name: Build package
48+
- name: Build package with uv
5549
run: |
56-
poetry build --ansi
50+
uv build
5751
5852
- name: Publish package on PyPI
5953
if: steps.check-version.outputs.tag

0 commit comments

Comments
 (0)