Merge pull request #485 from ag2ai/master #51
Workflow file for this run
This file contains hidden or 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: Publish | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI | |
if: "success() && startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/cache@v1 | |
with: | |
path: | | |
~/.cache/pypoetry | |
~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Build publish | |
run: | | |
python -m pip install poetry poetry-dynamic-versioning | |
poetry install | |
poetry build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |