更新版本号

This commit is contained in:
root 2024-03-30 10:56:51 +08:00
parent f512220564
commit 9e49101e5c
2 changed files with 7 additions and 9 deletions

View File

@ -2,13 +2,13 @@
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# action的名称
name: Upload Python Package gotwo
name: Upload Python Package
on:
# 当master分支有push时触发action
push:
pull_request:
tags:
- v**
jobs:
deploy:
name: publish python package to PYPI
@ -25,7 +25,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install wheel twine
python -m pip install -r requirements.txt
echo $GITHUB_RUN_ID
# - name: Test Code
# run: |
# ./test.sh

View File

@ -8,13 +8,11 @@ from platformdirs import PlatformDirs
dirs = PlatformDirs("PMPT", "MoYan")
IndexList = []
def getVer():
s = os.popen('git describe --tags').read()
print(s)
baseVar = s.split('v')[1].split('-')[0] + '_' + os.environ.get('GITHUB_RUN_ID', str(int(time.time()))[:6])
def getVer(baseVar):
baseVar = baseVar + '.' + os.environ.get('GITHUB_RUN_ID', str(int(time.time()))[:6])
return baseVar
__version__ = getVer()
__version__ = getVer('1.0.1')
def init():
os.makedirs(dirs.user_data_dir,exist_ok=True)
os.makedirs(os.path.join(dirs.user_data_dir,'Index'),exist_ok=True)