Publish #21
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: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| deploy: | |
| name: Publish | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: | | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| python3 -m pip install -U pip poetry | |
| poetry --version | |
| poetry check --no-interaction | |
| poetry config virtualenvs.in-project true | |
| poetry install --no-interaction | |
| - name: Run tests | |
| run: | | |
| poetry run pytest -v | |
| - name: Build package | |
| run: | | |
| poetry build --no-interaction | |
| - name: Publish to PyPi | |
| env: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| run: | | |
| poetry config pypi-token.pypi $PYPI_TOKEN | |
| poetry publish --build --no-interaction |