@@ -227,3 +227,55 @@ jobs:
227227 with :
228228 path : ./quaddtype/wheelhouse/*.whl
229229 name : wheels-windows-${{ matrix.architecture }}
230+
231+ publish_to_testpypi :
232+ name : Publish to TestPyPI
233+ needs : [build_wheels_linux, build_wheels_macos, build_wheels_windows]
234+ runs-on : ubuntu-latest
235+ if : startsWith(github.ref, 'refs/tags/')
236+ steps :
237+ - name : Download all workflow run artifacts
238+ uses : actions/download-artifact@v2
239+ with :
240+ path : dist
241+ - name : Publish to TestPyPI
242+ uses : pypa/gh-action-pypi-publish@v1.9.0
243+ with :
244+ user : __token__
245+ password : ${{ secrets.PYPI_API_TOKEN }}
246+ repository-url : https://test.pypi.org/legacy/
247+ packages-dir : dist/*
248+
249+ create_release :
250+ name : Create Release
251+ needs : [build_wheels_linux, build_wheels_macos, build_wheels_windows]
252+ runs-on : ubuntu-latest
253+ if : startsWith(github.ref, 'refs/tags/')
254+
255+ steps :
256+ - name : Checkout code
257+ uses : actions/checkout@v2
258+
259+ - name : Download all workflow run artifacts
260+ uses : actions/download-artifact@v2
261+ with :
262+ path : artifacts
263+
264+ - name : Create Release
265+ id : create_release
266+ uses : actions/create-release@v1
267+ env :
268+ GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
269+ with :
270+ tag_name : ${{ github.ref }}
271+ release_name : Release ${{ github.ref }}
272+ draft : false
273+ prerelease : false
274+
275+ - name : Upload Release Assets
276+ uses : softprops/action-gh-release@v1
277+ if : startsWith(github.ref, 'refs/tags/')
278+ with :
279+ files : ./artifacts/**/*.whl
280+ env :
281+ GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
0 commit comments