update publish workflow

This commit is contained in:
collerek
2021-10-13 14:05:39 +02:00
committed by GitHub
parent b66edca74b
commit b197d4d3c7

View File

@ -7,6 +7,9 @@ on:
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
@ -15,18 +18,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v2.2.2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade poetry
poetry install --no-dev
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Install Poetry
uses: snok/install-poetry@v1.2
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build and publish
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry publish --build
poetry build -vvv
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}