File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2424 npm install tsx
2525 - name : Build
2626 run : |
27+ cd build
2728 # get repository name and it's first word before hyphen and pass that as argument
2829 REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | cut -d'-' -f1)
2930 npm run build -- $REPO_NAME
4748 env :
4849 PYPI_API_SECRET : ${{ secrets.PYPI_API_SECRET }}
4950 run : |
50- cd build || echo ""
51+ cd build
5152 npm run pypi-publish
5253
5354 - name : Upload to PyPI
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class pypi {
3737 cp ( this . rootDir + `/README.md` , this . tempPyDir + '/README.md' ) ;
3838 // write pyproject.toml
3939 const verion = this . defineVersion ( ) ;
40- fs . writeFileSync ( this . tempPyDir + '/pyproject.toml' , this . pyprojectTolmContent ( pypiPackageNameSanitized ) ) ;
40+ fs . writeFileSync ( this . tempPyDir + '/pyproject.toml' , this . pyprojectTolmContent ( pypiPackageNameSanitized , verion ) ) ;
4141 this . pythonPackageBuild ( ) ;
4242 }
4343
@@ -81,6 +81,7 @@ class pypi {
8181 const res = execSync ( `pip index versions ` + this . exchangeConfigs [ this . exchange ] . __PYTHON_PACKAGE_NAME__ ) ;
8282 const versions = res . toString ( ) . trim ( ) ;
8383 const matches = versions . match ( / \( ( \S + ) \) / ) ;
84+ // @ts -ignore
8485 const newVersion = semver . inc ( matches [ 1 ] , 'patch' ) ;
8586 return newVersion ;
8687 }
You can’t perform that action at this time.
0 commit comments