This repository was archived by the owner on Apr 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 3131 run : poetry install
3232
3333 - name : Authenticate to PyPI
34- run : poetry config http-basic.pypi '${{ secrets.PYPI_USERNAME }}' '${{ secrets.PYPI_PASSWORD }}'
35-
36- - name : Release
37- run : poetry run invoke release
34+ run :
35+ poetry config http-basic.pypi ${{ secrets.PYPI_USERNAME }} ${{ secrets.PYPI_PASSWORD }};\
36+ poetry run invoke release ${{ github.event.release.name }}
Original file line number Diff line number Diff line change @@ -13,12 +13,8 @@ def test(context: Context) -> None:
1313 context .run ('pytest . --cov=. --cov-report=xml' , pty = True )
1414
1515
16- def _get_today_timestamp () -> str :
17- return datetime .datetime .utcnow ().strftime ('%Y.%m.%d' )
18-
19-
2016@task
21- def release (context : Context ) -> None :
17+ def release (context : Context , version : str ) -> None :
2218 """Build & Publish to PyPI."""
2319
2420 # load pyproject
@@ -28,7 +24,7 @@ def release(context: Context) -> None:
2824 pyproject_string = pyproject_file .read ()
2925 pyproject = toml .loads (pyproject_string )
3026 # change version to today datetime
31- pyproject ['tool' ]['poetry' ]['version' ] = _get_today_timestamp ()
27+ pyproject ['tool' ]['poetry' ]['version' ] = version
3228 with open (pyproject_path , 'w' , encoding = 'utf-8' ) as pyproject_file :
3329 toml .dump (pyproject , pyproject_file )
3430
You can’t perform that action at this time.
0 commit comments