Merge pull request #4 from k4rimDev/dev #1
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: Publish to PyPI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry | |
run: curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: poetry install --no-dev | |
- name: Build the package | |
run: poetry build | |
- name: Publish to PyPI | |
env: | |
POETRY_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: poetry publish --build --username __token__ --password $POETRY_PASSWORD |