Variable position #106
Workflow file for this run
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
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
name: Upload Python Package | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/dothttp-req | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: Gr1N/setup-poetry@v8 | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.create false | |
# can use single requirement file referring all three | |
poetry install --all-extras --no-root | |
# unit tests need python-magic | |
# package in pypi woudn't need python-magic | |
# for integration tests | |
pytest | |
- name: Build Distribution | |
run: | | |
# install prerequisites | |
poetry build | |
# retrieve your distributions here | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |