Skip to content

Commit c1b8607

Browse files
committed
🔧 Update CI/CD workflow configuration
Update GitHub Actions workflow configuration Modify the CI/CD pipeline configuration to align with recent project changes. This follows the addition of diagnostic tools and new dependencies like Pillow for image processing.
1 parent e195961 commit c1b8607

File tree

1 file changed

+60
-55
lines changed

1 file changed

+60
-55
lines changed

.github/workflows/ci-cd.yml

+60-55
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,80 @@
1-
name: CI/CD
1+
name: DroidMind CI/CD
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
tags:
7-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
88
pull_request:
9-
branches: [ main ]
9+
branches: [main]
10+
workflow_dispatch: # Allow manual triggering
1011

1112
jobs:
1213
build-and-test:
1314
runs-on: ubuntu-latest
1415
steps:
15-
- uses: actions/checkout@v3
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.13'
20-
- name: Set up uv
21-
uses: astral-sh/setup-uv@v5
22-
with:
23-
version: "0.6.3"
24-
- name: Install dependencies
25-
run: uv sync
26-
- name: Run lint checks
27-
run: uv run ruff check .
28-
- name: Run tests
29-
run: uv run pytest
30-
- name: Upload test results
31-
uses: actions/upload-artifact@v4
32-
with:
33-
name: test-results
34-
path: test-results
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: 💿 Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.13"
24+
cache-dependency-path: "pyproject.toml"
25+
26+
- name: 🛠️ Set up uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
version: "0.6.3"
30+
31+
- name: 📦 Install dependencies
32+
run: uv sync
33+
34+
- name: 🔍 Ruff lint check
35+
uses: astral-sh/ruff-action@v3
36+
with:
37+
version: latest
38+
39+
- name: 🧪 Run tests
40+
run: uv run pytest
3541

3642
create-release:
3743
needs: [build-and-test]
3844
runs-on: ubuntu-latest
3945
if: startsWith(github.ref, 'refs/tags/')
46+
permissions:
47+
contents: write
4048
steps:
41-
- uses: actions/checkout@v3
42-
- name: Create Release
43-
id: create_release
44-
uses: actions/create-release@v1
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
with:
48-
tag_name: ${{ github.ref }}
49-
release_name: Release ${{ github.ref }}
50-
draft: false
51-
prerelease: false
49+
- uses: actions/checkout@v4
50+
51+
- name: 🏷️ Create Release
52+
uses: softprops/action-gh-release@v2
53+
with:
54+
name: Release ${{ github.ref_name }}
55+
generate_release_notes: true
5256

53-
release:
57+
publish:
5458
needs: create-release
5559
runs-on: ubuntu-latest
60+
if: startsWith(github.ref, 'refs/tags/')
61+
permissions:
62+
id-token: write # For trusted publishing
5663
steps:
57-
- uses: actions/checkout@v3
58-
- name: Set up Python
59-
uses: actions/setup-python@v4
60-
with:
61-
python-version: '3.13'
62-
- name: Set up uv
63-
uses: astral-sh/setup-uv@v1
64-
- name: Install dependencies
65-
run: |
66-
uv pip install --system -e ".[dev]"
67-
uv pip install build twine
68-
- name: Build package
69-
run: uv run python -m build
70-
- name: Publish to PyPI
71-
env:
72-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
73-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
74-
run: |
75-
uv run twine upload dist/*
64+
- uses: actions/checkout@v4
65+
66+
- name: 💿 Set up Python
67+
uses: actions/setup-python@v5
68+
with:
69+
python-version: "3.13"
70+
71+
- name: 🛠️ Set up uv
72+
uses: astral-sh/setup-uv@v5
73+
74+
- name: 📦 Build package
75+
run: |
76+
uv pip install build
77+
uv run python -m build
78+
79+
- name: 🚀 Publish to PyPI
80+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)