Production Pypi #70
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
name: Production Pypi | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
production-deploy: | |
name: Pypi | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/enma | |
permissions: | |
id-token: write | |
if: "!contains(github.ref, '-')" | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Preparing the Environment | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pip-tools | |
pip install hatch pytest pytest-cov | |
pip-compile pyproject.toml -o requirements-build.txt --all-extras | |
pip install -r requirements-build.txt | |
- name: Starting Testing Suites | |
run: | | |
ENMA_CACHING_STATE=disabled \ | |
hatch run pytest ./tests | |
- name: Upload Report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: pytest | |
- name: Building and Deploying | |
run: | | |
hatch build | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: dist/ | |
verify-metadata: false |