ci build
This commit is contained in:
parent
1d15326025
commit
da32ddf855
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -34,24 +34,25 @@ jobs:
|
||||
SITEPKG=$(pipenv run python -c "import site; print(site.getsitepackages()[-1])")
|
||||
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $SITEPKG
|
||||
cat build/chkbit/warn-chkbit.txt
|
||||
a=$(grep -oP '(?<=version = ")[^"]+' pyproject.toml)
|
||||
b=$(grep -oP '(?<=__version__ = ")[^"]+' chkbit_cli/__init__.py)
|
||||
if [[ $a != $b ]]; then echo "version error $a $b"; exit 1; fi
|
||||
cd dist; ls -l
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
a=$(grep -oP '(?<=version = ")[^"]+' ../pyproject.toml)
|
||||
b=$(grep -oP '(?<=__version__ = ")[^"]+' ../chkbit_cli/__init__.py)
|
||||
if [[ $a != $b ]]; then echo "version error $a $b"; exit 1; fi
|
||||
c=$(./chkbit --version)
|
||||
echo $c
|
||||
if [[ $a != $c ]]; then echo "version error $a $c"; exit 1; fi
|
||||
tar -czf chkbit-linux_amd64.tar.gz chkbit
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
c=$(./chkbit --version)
|
||||
./chkbit --version
|
||||
tar -czf chkbit-macos_amd64.tar.gz chkbit
|
||||
elif [ "$RUNNER_OS" == "Windows" ]; then
|
||||
c=$(chkbit.exe --version)
|
||||
./chkbit.exe --version
|
||||
7z a -tzip chkbit-windows_amd64.zip chkbit.exe
|
||||
else
|
||||
echo 'unknown runner'
|
||||
exit 1
|
||||
fi
|
||||
if [[ $a != $c ]]; then echo "version error $a $c"; exit 1; fi
|
||||
|
||||
- name: artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
Loading…
x
Reference in New Issue
Block a user