mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Add pre-release version to package and upload to TestPyPI
Update version to form {current-version}-alpha.{unix-timestamp} in setup.py
This commit is contained in:
parent
b3ebb01beb
commit
4bc5ac2420
1 changed files with 12 additions and 0 deletions
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
|
@ -36,8 +36,20 @@ jobs:
|
|||
twine check dist/*
|
||||
|
||||
- name: Publish App to PyPI
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
|
||||
run: |
|
||||
twine upload dist/*
|
||||
|
||||
- name: Publish App to Test PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }}
|
||||
run: |
|
||||
sed -E -i "s/version='(.*)',/version=\1-alpha.$(date +%s)',/g" setup.py
|
||||
rm -rf dist
|
||||
python -m build
|
||||
twine check dist/*
|
||||
twine upload -r testpypi dist/*
|
Loading…
Reference in a new issue