Skip to content

(#8) udpate version [deploy] #27

(#8) udpate version [deploy]

(#8) udpate version [deploy] #27

Workflow file for this run

name: Publish Python Package to PyPI
on:
push:
branches:
- dev
release:
types: [published]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install build tools
run: |
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: Run deployment script
if: steps.check-deploy.outcome == 'success'
run: ./deploy.sh
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}