Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try fix Upload Release Assets #26

Merged
merged 18 commits into from Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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