Skip to content

Commit

Permalink
(#8) udpate ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Jan 14, 2025
1 parent 47a3f93 commit 15633cf
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ jobs:
python -m pip install --upgrade pip
pip install build twine
- name: Check commit message for '[deploy]'
id: check-deploy
run: |
if ! git log -1 --pretty=%B | grep -q '\[deploy\]'; then
echo "No [deploy] tag found in the commit message. Skipping deployment."
exit 0
fi
- name: Check commit message for '[deploy]'
id: check-deploy
run: |
if ! git log -1 --pretty=%B | grep -q '\[deploy\]'; then
echo "No [deploy] tag found in the commit message. Skipping deployment."
exit 0
fi
- name: Build package
if: steps.check-deploy.outputs.result == 'true'
if: always()
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
if: steps.check-deploy.outputs.result == 'true'
if: success() && steps.check-deploy.outcome == 'success'
run: |
python -m twine upload \
--non-interactive \
Expand All @@ -48,4 +48,3 @@ jobs:
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 15633cf

Please sign in to comment.