File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,20 @@ jobs:
67
67
- run : coverage combine
68
68
- run : coverage xml
69
69
70
- - uses : codecov/codecov-action@v2
70
+ - uses : codecov/codecov-action@v3
71
71
with :
72
72
file : ./coverage.xml
73
73
env_vars : PYTHON,OS
74
74
75
- deploy :
76
- name : Deploy
75
+ release :
76
+ name : Release
77
77
needs : [lint, test]
78
78
if : " success() && startsWith(github.ref, 'refs/tags/')"
79
79
runs-on : ubuntu-latest
80
+ environment : release
81
+
82
+ permissions :
83
+ id-token : write
80
84
81
85
steps :
82
86
- uses : actions/checkout@v2
@@ -87,21 +91,17 @@ jobs:
87
91
python-version : ' 3.10'
88
92
89
93
- name : install
90
- run : pip install -U twine build packaging
94
+ run : pip install -U build
91
95
92
- - name : check version
93
- id : check-version
94
- run : python <(curl -Ls https://gist.githubusercontent.com/samuelcolvin/4e1ad439c5489e8d6478cdee3eb952ef/raw/check_version.py)
95
- env :
96
- VERSION_PATH : ' pydantic_settings/version.py'
96
+ - name : check GITHUB_REF matches package version
97
+ uses : samuelcolvin/check-python-version@v3.1
98
+ with :
99
+ version_file_path : pydantic_settings/version.py
97
100
98
101
- name : build
99
102
run : python -m build
100
103
101
104
- run : twine check dist/*
102
105
103
- - name : upload to pypi
104
- run : twine upload dist/*
105
- env :
106
- TWINE_USERNAME : __token__
107
- TWINE_PASSWORD : ${{ secrets.pypi_token }}
106
+ - name : Upload package to PyPI
107
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments