Skip to content

Commit 2935fb7

Browse files
committed
Update CI workflow: enhance comments, streamline build process, and prepare for PyPI publishing
1 parent d0fff16 commit 2935fb7

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# GitHub Actions CI workflow for TaskNow CLI
2-
# This workflow runs tests, checks coverage, and builds the package on every push and pull request.
3-
# Compatible with Python 3.10+
2+
# This workflow runs tests, checks coverage, builds, and publishes to PyPI on version tags.
43

54
name: CI for TaskNow CLI
65

76
on:
87
push:
9-
branches: ["**"] # Run on all branches
8+
branches: ["**"]
109
tags:
11-
- "v*" # Also run on version tags
10+
- "v*"
1211
pull_request:
13-
branches: ["**"] # Run on all PRs
12+
branches: ["**"]
1413

1514
jobs:
1615
build-test:
@@ -42,25 +41,17 @@ jobs:
4241
run: |
4342
coverage run -m pytest
4443
coverage report
45-
coverage html # Generate HTML report
44+
coverage html
4645
4746
- name: Upload coverage report artifact
4847
uses: actions/upload-artifact@v4
4948
with:
5049
name: htmlcov-${{ matrix.python-version }}
51-
path: htmlcov # Directory generated by 'coverage html'
50+
path: htmlcov
5251

5352
- name: Build package
54-
run: python setup.py sdist bdist_wheel
55-
56-
# Placeholder for future PyPI deployment
57-
# - name: Publish to PyPI
58-
# run: |
59-
# python -m pip install --upgrade twine
60-
# twine upload dist/*
61-
# env:
62-
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
63-
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
53+
run: python -m build
54+
6455
publish:
6556
name: Build and Publish to PyPI
6657
needs: build-test

0 commit comments

Comments
 (0)