Skip to content

Commit 6c02d0b

Browse files
authored
ci: improve cd pipeline to ensure dist is cleaned up before build done by semantic release (#7)
1 parent 0919c42 commit 6c02d0b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/cd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,14 @@ jobs:
6767
run: hatch run examples:check
6868

6969
- name: Check wheels can be built
70-
run: hatch build
70+
run: hatch build && hatch run cicd:clean_dist
7171

7272
- name: Run tests (codebase)
7373
run: hatch run tests
7474

7575
- name: Run tests (examples)
7676
run: hatch run examples:tests
7777

78-
- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
79-
with:
80-
path: dist
81-
8278
- name: Python Semantic Release
8379
id: semantic-release
8480
if: ${{ github.ref == 'refs/heads/main' }}
@@ -93,3 +89,7 @@ jobs:
9389
uses: pypa/gh-action-pypi-publish@release/v1
9490
with:
9591
packages-dir: dist
92+
93+
- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
94+
with:
95+
path: dist

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ dependencies = [
116116
localnet_start = [
117117
"algokit localnet start",
118118
]
119+
clean_dist = "rm -rf dist"
119120

120121
# docs environment
121122
[tool.hatch.envs.docs]

0 commit comments

Comments
 (0)