Deployment #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
# deploy package to pypi on condition of | |
# push to main branch | |
# and release published | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
Publish-Package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.10 | |
- name: Version the package | |
run: | | |
echo "__version__ = '${{ github.ref_name }}'" > chapa/__init__.py | |
export CHAPA_VERSION=${{ github.ref_name }} | |
- name: Install pypa/build | |
run: | | |
python -m pip install build | |
python -m pip install wheel twine setuptools | |
- name: Build a binary wheel and a source tarball | |
run: python -m build | |
- name: Publish distribution 📦 to PyPI | |
run: python -m twine upload dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |