Skip to content

Commit 3b2247c

Browse files
committed
fix publish and release workflows
1 parent f86c95e commit 3b2247c

2 files changed

Lines changed: 17 additions & 38 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,18 @@ jobs:
2222
- 6379:6379
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626
- name: Setup Python
27-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2828
with:
2929
python-version: "3.9"
30-
- name: Install Poetry
31-
uses: Gr1N/setup-poetry@v8
32-
- uses: actions/cache@v3
33-
with:
34-
path: ~/.cache/pypoetry/virtualenvs
35-
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
36-
- name: Checks
37-
run: |
38-
poetry --version
39-
poetry check --no-interaction
4030
- name: Install deps
41-
run: poetry install --no-interaction
31+
run: uv sync --frozen
4232
- name: Run tests
43-
run: poetry run pytest -v
33+
run: uv run --no-sync pytest -v
34+
- name: Build
35+
run: uv build
4436
- name: Publish to PyPI
4537
env:
46-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
47-
run: |
48-
poetry config pypi-token.pypi $PYPI_TOKEN
49-
poetry publish --build
38+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
39+
run: uv publish

.github/workflows/release.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,18 @@ jobs:
2424
ports:
2525
- 6379:6379
2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 0
30-
- uses: actions/setup-python@v4
30+
- uses: actions/setup-python@v5
3131
with:
3232
python-version: "3.9"
33-
- name: Install Poetry
34-
uses: Gr1N/setup-poetry@v8
35-
- uses: actions/cache@v3
33+
- uses: astral-sh/setup-uv@v3
3634
with:
37-
path: ~/.cache/pypoetry/virtualenvs
38-
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
39-
- name: Checks
40-
run: |
41-
poetry --version
42-
poetry check --no-interaction
35+
enable-cache: true
4336
- name: Add version to environment vars
4437
run: |
45-
PROJECT_VERSION=$(poetry version --short)
38+
PROJECT_VERSION=$(uvx dunamai from any --format "{base}")
4639
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
4740
- name: Check if tag version matches project version
4841
run: |
@@ -51,18 +44,14 @@ jobs:
5144
echo $PROJECT_VERSION
5245
if [[ "$TAG" != "v$PROJECT_VERSION" ]]; then exit 1; fi
5346
54-
- name: Checks
55-
run: |
56-
poetry --version
57-
poetry check --no-interaction
5847
- name: Install deps
59-
run: poetry install --no-interaction
48+
run: uv sync --frozen
6049
- name: Run tests
61-
run: poetry run pytest -v
50+
run: uv run --no-sync pytest -v
6251
- name: Build
63-
run: poetry build
52+
run: uv build
6453
- name: Create Release Draft
65-
uses: softprops/action-gh-release@v1
54+
uses: softprops/action-gh-release@v2
6655
env:
6756
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6857
with:

0 commit comments

Comments
 (0)