Skip to content

Commit

Permalink
publish1
Browse files Browse the repository at this point in the history
  • Loading branch information
laktak committed Jan 13, 2024
1 parent 57e3a81 commit 04803c6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 14 deletions.
59 changes: 46 additions & 13 deletions .github/workflows/pyinstaller.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: pyinstaller

name: build

on: [push]

Expand All @@ -15,13 +16,15 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: prep
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pipenv pyinstaller==6.3.0
pipenv install
rm -rf build dist
- name: build
shell: bash
run: |
Expand All @@ -32,28 +35,58 @@ jobs:
pipenv run pyinstaller run.py --hidden-import chkbit --hidden-import chkbit_cli --onefile --name chkbit --console --paths $SITEPKG
cat build/chkbit/warn-chkbit.txt
cd dist; ls -l
if [ "$RUNNER_OS" == "Windows" ]; then
7z a -tzip chkbit.zip chkbit.exe
if [ "$RUNNER_OS" == "Linux" ]; then
tar -czf chkbit-linux_amd64.tar.gz chkbit
elif [ "$RUNNER_OS" == "macOS" ]; then
tar -czf chkbit-macos_amd64.tar.gz chkbit
elif [ "$RUNNER_OS" == "Windows" ]; then
7z a -tzip chkbit-windows_amd64.zip chkbit.exe
else
tar -czf chkbit.tar.gz chkbit
echo 'unknown runner'
exit 1
fi
- name: artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: chkbit-linux_amd64.tar.gz
path: dist/chkbit.tar.gz
name: binary-${{ matrix.os }}
path: dist/chkbit*.tar.gz

- name: artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: chkbit-macos_amd64.tar.gz
path: dist/chkbit.tar.gz
name: binary-${{ matrix.os }}
path: dist/chkbit*.tar.gz

- name: artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: chkbit-windows_amd64.zip
path: dist/chkbit.zip
name: binary-${{ matrix.os }}
path: dist/chkbit*.zip


publish:
runs-on: ubuntu-latest
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

steps:
- name: get-artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: list
shell: bash
run: |
find
ls -l dist
- name: publish-release
uses: softprops/action-gh-release@v1
with:
draft: true
files: dist/*

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Lint
name: lint

on: [push, pull_request]

Expand Down

0 comments on commit 04803c6

Please sign in to comment.