File tree Expand file tree Collapse file tree 2 files changed +67
-2
lines changed Expand file tree Collapse file tree 2 files changed +67
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish on PyPI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " main"
7
+ release :
8
+ types : [created]
9
+
10
+ permissions :
11
+ contents : read
12
+
13
+ jobs :
14
+ build :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 1
20
+
21
+ - name : Set up Python 3.12
22
+ uses : actions/setup-python@v5
23
+ with :
24
+ python-version : ' 3.12'
25
+ cache : pip
26
+ cache-dependency-path : |
27
+ **/setup.py
28
+ **/requirements*.txt
29
+
30
+ - name : Install dependencies
31
+ run : |
32
+ pip install -r requirements.txt -r requirements-dev.txt
33
+
34
+ - name : Build wheel
35
+ run : |
36
+ python setup.py sdist bdist_wheel
37
+ twine check dist/*
38
+
39
+ - name : Upload build for publishing
40
+ uses : actions/upload-artifact@v4
41
+ with :
42
+ name : parse_model_release
43
+ if-no-files-found : error
44
+ retention-days : 1
45
+ path : dist/*
46
+
47
+ pypi-publish :
48
+ name : Upload release to PyPI
49
+ runs-on : ubuntu-latest
50
+ needs : build
51
+ environment : release
52
+ permissions :
53
+ id-token : write
54
+ steps :
55
+ - name : Download math result for job 1
56
+ uses : actions/download-artifact@v4
57
+ with :
58
+ name : parse_model_release
59
+ path : dist
60
+
61
+ - name : Publish package distributions to PyPI
62
+ uses : pypa/gh-action-pypi-publish@release/v1
63
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
64
+ with :
65
+ print-hash : true
Original file line number Diff line number Diff line change 9
9
long_description = f .read ()
10
10
11
11
setup (
12
- name = 'document-model-python ' ,
13
- version = '0.1.0 ' ,
12
+ name = 'parse- document-model' ,
13
+ version = '0.0.2 ' ,
14
14
description = 'Pydantic models for representing a text document as a hierarchical structure.' ,
15
15
long_description = long_description ,
16
16
long_description_content_type = 'text/markdown' ,
You can’t perform that action at this time.
0 commit comments