Skip to content

Commit

Permalink
⬆️ CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-github committed Mar 2, 2023
1 parent 38e38e0 commit b0d0744
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
python -m pip cache purge
- name: install poetry
run: python -m pip install poetry
run: python -m pip install poetry==1.3.2

- name: install depencies
run: |
Expand Down
11 changes: 7 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
#!/bin/bash

# dir name
dir=$(basename $(dirname $0))

# pypi token
pypi_token=$(cat PYPI_TOKEN)

# 从__init__.py文件中读取版本信息
version=$(python -c "from src.notion_nlp import __version__; print(__version__)")
version=$(python -c "from src.$dir import __version__; print(__version__)")

# build & publish
poetry build && \
poetry publish -u __token__ -p $pypi_token

# pyinstaller linux exec file
pyinstaller -F src/notion_nlp/__main__.py -n notion-nlp-linux && \
pyinstaller -F src/$dir/__main__.py -n $dir-linux && \

# Compress the executable file
zip ./dist/notion-nlp-linux.zip ./dist/notion-nlp-linux ./scripts/Chinese-simple.sh scripts/English.sh scripts/start.sh
zip ./dist/$dir-linux.zip ./dist/$dir-linux ./scripts/Chinese-simple.sh scripts/English.sh scripts/start.sh

zip dist/notion-nlp-win64.zip dist/notion-nlp-win64.exe scripts/Chinese-simple.bat scripts/English.bat scripts/start.bat
zip dist/$dir-win64.zip dist/$dir-win64.exe scripts/Chinese-simple.bat scripts/English.bat scripts/start.bat

0 comments on commit b0d0744

Please sign in to comment.