From da32ddf855114244d0ebf39c31fef6cdf76e2a7d Mon Sep 17 00:00:00 2001 From: Christian Zangl Date: Fri, 28 Jun 2024 22:08:43 +0200 Subject: [PATCH] ci build --- .github/workflows/build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99ea996..c6746f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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