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+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
5+
6+ name : Publish to PyPI
7+
8+ on :
9+ push :
10+ tags :
11+ - " v*"
12+ release :
13+ types : [published]
14+ workflow_dispatch :
15+
16+ jobs :
17+ release-build :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - uses : actions/checkout@v5
22+
23+ - uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.12"
26+
27+ - name : extract version from tag
28+ id : version
29+ run : echo "PACKAGE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
30+
31+ - name : build release distributions
32+ run : |
33+ python -m pip install build
34+ python -m build
35+
36+ - name : upload windows dists
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : release-dists
40+ path : dist/
41+
42+ pypi-publish :
43+ name : upload release to PyPI
44+ runs-on : ubuntu-latest
45+ needs :
46+ - release-build
47+ permissions :
48+ id-token : write
49+
50+ steps :
51+ - name : Retrieve release distributions
52+ uses : actions/download-artifact@v5
53+ with :
54+ name : release-dists
55+ path : dist/
56+
57+ - name : Publish release distributions to PyPI
58+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1- from setuptools import setup , find_packages
1+ import os
2+ from setuptools import setup , find_packages
23from pathlib import Path
34
45this_directory = Path (__file__ ).parent
56long_description = (this_directory / "README.md" ).read_text ()
67NAME = "dataforseo-client"
7- VERSION = "2.0.23"
8+ VERSION = os . environ [ "PACKAGE_VERSION" ]
89PYTHON_REQUIRES = ">=3.7"
910REQUIRES = [
1011 "urllib3 >= 1.25.3" ,
You can’t perform that action at this time.
0 commit comments