Release #3
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: Release | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
on: | |
release: | |
types: [published] | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+(-beta(.[0-9]+)?|-alpha(.[0-9]+)?)?" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository ๐๏ธ | |
uses: actions/checkout@v4 | |
- name: Install Python 3.10 ๐ | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Set up runner ๐ฆ | |
run: pip install -r requirements.txt -r requirements-dev.txt | |
- name: "Black: Code Formatting ๐ฎ๐ฝโโ๏ธ" | |
run: black --check medconb_client.py | |
- name: "Pylama: Linting ๐งน" | |
run: ruff check medconb_client.py | |
- name: "Mypy: Type checking ๐ฎ๐ฝโโ๏ธ" | |
run: mypy medconb_client.py | |
pypi-publish: | |
runs-on: ubuntu-latest | |
needs: lint | |
environment: | |
name: pypi | |
url: https://pypi.org/p/medconb-client | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Checkout Repository ๐๏ธ | |
uses: actions/checkout@v4 | |
- name: Install Python 3.10 ๐ | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Clean old build artifacts | |
run: rm -rf dist/* | |
- name: Build deps | |
run: python3 -m pip install -r requirements.txt -r requirements-dev.txt | |
- name: Build artifacts | |
run: python -m build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |