Skip to content

Commit abe2945

Browse files
committed
fix: workflow
1 parent fce9886 commit abe2945

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

.github/workflows/release.yml

+23-19
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,44 @@ jobs:
1414
run: |
1515
sudo apt update
1616
sudo apt install -y git
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.10'
22+
1723
- name: Install uv
1824
uses: astral-sh/setup-uv@v3
25+
1926
- name: Install Node Env
2027
uses: actions/setup-node@v4
2128
with:
2229
node-version: 20
30+
2331
- name: Checkout
2432
uses: actions/[email protected]
2533
with:
2634
fetch-depth: 0
2735
persist-credentials: false
28-
- name: Create Virtual Environment
36+
37+
- name: Build and validate package
2938
run: |
3039
uv venv
31-
- name: Activate Virtual Environment and Install Dependencies
32-
run: |
33-
source .venv/bin/activate # For Linux/macOS. Use .venv\Scripts\activate for Windows
34-
uv sync --frozen
40+
. .venv/bin/activate
3541
uv pip install --upgrade setuptools wheel hatchling twine
36-
- name: Build app
37-
run: |
38-
source .venv/bin/activate # Activate the virtual environment again if needed
42+
uv sync --frozen
43+
uv pip install -e .
3944
uv build
40-
id: build_cache
41-
if: success()
42-
- name: Validate Metadata
43-
run: |
44-
source .venv/bin/activate
4545
uv run twine check dist/*
46+
4647
- name: Debug Dist Directory
47-
run: |
48-
ls -al dist
48+
run: ls -al dist
49+
4950
- name: Cache build
5051
uses: actions/cache@v3
5152
with:
5253
path: ./dist
5354
key: ${{ runner.os }}-build-${{ github.sha }}
54-
if: steps.build_cache.outputs.id != ''
5555

5656
release:
5757
name: Release
@@ -73,9 +73,13 @@ jobs:
7373
with:
7474
fetch-depth: 0
7575
persist-credentials: false
76-
- name: Restore Virtual Environment
77-
run: |
78-
source .venv/bin/activate
76+
77+
- name: Restore build artifacts
78+
uses: actions/cache@v3
79+
with:
80+
path: ./dist
81+
key: ${{ runner.os }}-build-${{ github.sha }}
82+
7983
- name: Semantic Release
8084
uses: cycjimmy/[email protected]
8185
with:

0 commit comments

Comments
 (0)