Skip to content

Commit

Permalink
try fix Upload Release Assets (#26)
Browse files Browse the repository at this point in the history
* fix

* [ImgBot] Optimize images

*Total -- 435.32kb -> 276.76kb (36.42%)

/otherfile/images/config.png -- 20.77kb -> 11.67kb (43.81%)
/otherfile/images/history_index.png -- 414.56kb -> 265.09kb (36.05%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

* [Opt][Incomplete]Optimize history processing

* [FIX][Build APP]Rclone

* [ADD]Support Devices History Display

* [OPT][FIX][BUILDAPP]

* [OPT]Float process

* [FIX]build app

* fix Upload Release Assets

* fix Upload Release Assets

---------

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
  • Loading branch information
thun888 and ImgBotApp committed Mar 24, 2024
1 parent 95f8f62 commit 2d0b210
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/buildapp.yml
Expand Up @@ -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 ~
Expand Down
1 change: 0 additions & 1 deletion main.go
Expand Up @@ -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,
Expand Down

0 comments on commit 2d0b210

Please sign in to comment.