Automatic PyPi deployment. #1
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: Build, Test, and Upload Python Package | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
# test: | |
# uses: ./.github/workflows/ubuntu-python-package.yml # use the callable tests job to run tests | |
deploy: | |
runs-on: ubuntu-latest | |
# needs: [test] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
python -m pip install --upgrade pip | |
- name: Publish to PyPI | |
run: | | |
python -m venv venv | |
. ./venv/bin/activate | |
pip install -U twine build | |
python -m build . | |
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/* | |
env: | |
PYPI: ${{ secrets.PYPI }} |