@@ -45,10 +45,12 @@ jobs:
4545 - name : Install Python Dependencies
4646 run : |
4747 python -m pip install --upgrade pip
48- python -m pip install -r requirements_develop.txt
48+ python -m pip install build
49+ python -m pip install -r requirements_tests.txt
4950
5051 - name : Check black format
51- run : black --check --diff .
52+ run : |
53+ black --check --diff .
5254
5355 - name : Install Doxygen
5456 run : sudo apt-get install doxygen graphviz
@@ -88,10 +90,14 @@ jobs:
8890 - name : Prepare C++ Build
8991 run : mkdir build
9092
91- # Versioning
92- - name : Get versioning
93+ - name : Add Development Version Suffix
94+ if : ${{ !startsWith(github.ref, 'refs/tags') }}
95+ run : |
96+ echo "VERSION_SUFFIX = .dev`date -u '+%Y%m%d%H%M%S'`" >> VERSION
97+
98+ - name : Get git Version
9399 id : get_version
94- run : echo "VERSION=$(git describe --always)" >> $GITHUB_OUTPUT
100+ run : echo "VERSION=$(git describe --tags -- always)" >> $GITHUB_OUTPUT
95101
96102 - name : Prepare Documentation Build
97103 run : |
@@ -108,7 +114,7 @@ jobs:
108114 run : cmake --build . --config Release -j 4
109115
110116 - name : Build Python
111- run : python setup.py build && python setup.py sdist
117+ run : python -m build
112118
113119 - name : Install Python
114120 run : python -m pip install .
@@ -124,7 +130,14 @@ jobs:
124130 path : doc/html
125131 if-no-files-found : error
126132
127- - name : deploy to gh-pages if push to master branch
133+ - name : Upload Python Distribution
134+ if : ${{ github.event_name == 'pull_request' }}
135+ uses : actions/upload-artifact@v4
136+ with :
137+ name : python-dist
138+ path : dist/
139+
140+ - name : Deploy to gh-pages if push to master branch
128141 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
129142 uses : peaceiris/actions-gh-pages@v3
130143 with :
@@ -148,7 +161,10 @@ jobs:
148161 python-version : ' 3.8'
149162
150163 - name : Install Python Dependencies
151- run : python -m pip install --upgrade pip setuptools wheel pyyaml
164+ run : |
165+ python -m pip install --upgrade pip
166+ python -m pip install build
167+ python -m pip install -r requirements_tests.txt
152168
153169 - name : Cache Dependencies
154170 id : cache-depends
@@ -187,6 +203,11 @@ jobs:
187203 bash convert-to-proto3.sh
188204 rm *.pb2
189205
206+ - name : Add Development Version Suffix
207+ if : ${{ !startsWith(github.ref, 'refs/tags') }}
208+ run : |
209+ echo "VERSION_SUFFIX = .dev`date -u '+%Y%m%d%H%M%S'`" >> VERSION
210+
190211 - name : Configure C++ Build
191212 working-directory : build
192213 run : cmake ${{ env.PROTOBUF_VARIANT =='' && '-DCMAKE_CXX_STANDARD=17' }} ..
@@ -196,7 +217,7 @@ jobs:
196217 run : cmake --build . --config Release -j 4
197218
198219 - name : Build Python
199- run : python setup.py build && python setup.py sdist
220+ run : python -m build
200221
201222 - name : Install Python
202223 run : python -m pip install .
0 commit comments