-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.57 KB
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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