Skip to content

ci: improve cd pipeline to ensure dist is cleaned up before build done by semantic release #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,14 @@ jobs:
run: hatch run examples:check

- name: Check wheels can be built
run: hatch build
run: hatch build && hatch run cicd:clean_dist

- name: Run tests (codebase)
run: hatch run tests

- name: Run tests (examples)
run: hatch run examples:tests

- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
with:
path: dist

- name: Python Semantic Release
id: semantic-release
if: ${{ github.ref == 'refs/heads/main' }}
Expand All @@ -93,3 +89,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist

- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
with:
path: dist
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ dependencies = [
localnet_start = [
"algokit localnet start",
]
clean_dist = "rm -rf dist"

# docs environment
[tool.hatch.envs.docs]
Expand Down