Skip to content

Commit

Permalink
ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
laktak committed Jun 28, 2024
1 parent 1d15326 commit da32ddf
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da32ddf

Please sign in to comment.