From 2aa8faf50bffadcce6b7c7df3f7930031bde68fe Mon Sep 17 00:00:00 2001 From: noone <26899964+xxxXXX95@users.noreply.github.com> Date: Mon, 7 Mar 2022 10:24:25 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E6=B7=BB=E5=8A=A0=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E6=88=90=E5=8A=9F=E5=88=A4=E5=AE=9A=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 加入购物车成功判定 * Revert "Update GitHub action (#37)" This reverts commit 46d26dd179379774b03c88f5392e0f7cc30d1503. Co-authored-by: superq <13815865+meooxx@users.noreply.github.com> --- .github/workflows/workflow.yml | 23 ++++++++++------------- tools.js | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d1bbdb7..267668c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -7,10 +7,10 @@ on: # Triggers the workflow on push or pull request events but only for the rm branch release: types: [published] - # manully trigger the job push: branches: - github-action-test + # manully trigger the job workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel @@ -18,7 +18,7 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - runs-on: windows-latest + runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -40,29 +40,26 @@ jobs: if: steps.changed-files.outputs.any_changed == 'true' run: | cd gocode - set GOARCH=amd64 + CGO_ENABLED=0 + GOOS=windows + GOARCH=amd64 go build -o yuyue-setup-amd64.exe main.go - name: Build golang32 if: steps.changed-files.outputs.any_changed == 'true' run: | cd gocode - set GOARCH=386 + CGO_ENABLED=0 + GOOS=windows + GOARCH=386 go build -o yuyue-setup-amd32.exe main.go - name: Upload Release Asset if: steps.changed-files.outputs.any_changed == 'true' id: upload-release-asset uses: softprops/action-gh-release@v1 with: - tag_name: test files: | - gocode\yuyue-setup-amd64.exe - gocode\yuyue-setup-amd32.exe - message: - needs: [build] - # The type of runner that the job will run on - runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job - steps: + gocode/yuyue-setup-amd64.exe + gocode/yuyue-setup-amd32.exe - name: Telegram sender # You may pin to the exact commit or the version. # uses: robotomize/notify-telegram@f2821d117115d48ccbbde7609d2029603ee55b7e diff --git a/tools.js b/tools.js index 6c66622..7768a52 100644 --- a/tools.js +++ b/tools.js @@ -653,7 +653,7 @@ class Tools { headers }); if ( - // res.url.indexOf('https://cart.jd.com/addToCart.html') !== -1 || + res.url.indexOf('https://cart.jd.com/addToCart.html') !== -1 || res.url.indexOf('https://cart.jd.com/gateResult') !== -1 ) { // const text = await res.text();