From f8bc9ace699efbe2e47942417796c02a5f5839bb Mon Sep 17 00:00:00 2001 From: ikun0014 Date: Fri, 11 Oct 2024 21:21:25 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=AE=A9=E6=88=91=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=EF=BC=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 20 +++++++------------- main.py | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3b1992..06228f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,16 +74,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload to Telegram Channel - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.TELEGRAM_TO }} - token: ${{ secrets.TELEGRAM_TOKEN }} - message: | - ${{ github.actor }} created commit: - Commit message: ${{ github.event.commits[0].message }} - - Repository: ${{ github.repository }} - - See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} - document: | - build/Onekey---v${{ env.PACKAGE_VERSION }}.exe + run: | + curl -F chat_id=${{ secrets.TELEGRAM_TO }} \ + -F document=@build/Onekey---v${{ env.PACKAGE_VERSION }}.exe \ + -F caption="${{ github.actor }} created commit:\nCommit message: ${{ github.event.commits[0].message }}\n\nRepository: ${{ github.repository }}\n\nSee changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}" \ + -F parse_mode=Markdown \ + https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument + diff --git a/main.py b/main.py index 346fc1f..1df60fb 100644 --- a/main.py +++ b/main.py @@ -24,7 +24,7 @@ repos = [ def check_system_msg(): os_type = platform.system() try: - if not os_type == 'Windows': + if os_type != 'Windows': log.error(f'❌ 不用Windows你想上天?{os_type}') except Exception as e: log.error(f'❌ 获取系统类型失败:{stack_error(e)}')