Configuration (#21) #12
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 Release | |
on: | |
push: | |
branches: [main] | |
paths: | |
- src/* | |
- pyproject.toml | |
- poetry.lock | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: cardinalby/export-env-action@v2 | |
id: cicd_env | |
with: | |
envFile: 'github.env' | |
expand: 'true' | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ env.POETRY_VERSION }} | |
- run: pip install urllib3==1.26.15 requests-toolbelt==0.10.1 | |
- name: Build and publish to pypi | |
run: | | |
poetry install --no-dev | |
poetry build --format wheel | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
poetry publish |