diff --git a/.github/workflows/buildapp.yml b/.github/workflows/buildapp.yml index ce1577b..69684d9 100644 --- a/.github/workflows/buildapp.yml +++ b/.github/workflows/buildapp.yml @@ -112,32 +112,18 @@ jobs: name: mirouter-ui-darwin path: ./build - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} + - name: Upload Release Assets + uses: ncipollo/release-action@v1 + - name: Upload Release Assets + uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.event.inputs.version }} - release_name: Release ${{ github.event.inputs.version }} + artifacts: "build/" + token: ${{ secrets.TOKEN }} + tag: ${{ github.event.inputs.version }} + name: Release ${{ github.event.inputs.version }} draft: true - prerelease: false - - - name: Upload Release Assets - run: | - for file in ./build/*; do - if [ -f "$file" ]; then - echo "Uploading $file" - curl \ - -H "Authorization: token ${{ secrets.TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $file)" \ - -F "file=@$file" \ - "${{ steps.create_release.outputs.upload_url }}=$(basename $file)" - fi - done # 安装 rclone - # dev版本不另外发release - name: Install rclone run: | cd ~ diff --git a/main.go b/main.go index 83366e4..dd795f6 100644 --- a/main.go +++ b/main.go @@ -428,7 +428,6 @@ func main() { } history := database.GetDeviceHistory(databasepath, deviceMac, fixupfloat_bool) - return c.JSON(http.StatusOK, map[string]interface{}{ "code": 0, "history": history,