File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Python Package
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python-version : ["3.12"]
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Set up Python ${{ matrix.python-version }}
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ${{ matrix.python-version }}
22+ cache : pip
23+ cache-dependency-path : pyproject.toml
24+ - name : Install dependencies
25+ run : |
26+ pip install '.[test]'
27+ - name : Run tests
28+ run : |
29+ pytest
30+ deploy :
31+ runs-on : ubuntu-latest
32+ needs : [test]
33+ environment : release
34+ permissions :
35+ id-token : write
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : Set up Python
39+ uses : actions/setup-python@v5
40+ with :
41+ python-version : " 3.12"
42+ cache : pip
43+ cache-dependency-path : pyproject.toml
44+ - name : Install dependencies
45+ run : |
46+ pip install setuptools wheel build
47+ - name : Build
48+ run : |
49+ python -m build
50+ - name : Publish
51+ uses : pypa/gh-action-pypi-publish@release/v1
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments