Skip to content

Release

Release #3

Workflow file for this run

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