DEV/CD:将现有的版本检查API改为Github release API #10
Labels
enhancement
New feature or request
Comments
注:该api需将仓库设定为public,或使用个人访问令牌(Personal access token)请求。 |
延后。待admin portal完工后重新确认需求。 |
管理后台已上线,待管理后台的版本检查api上线后尽快接入。 |
经过讨论,使用GitHub release api作为版本更新接口。 使用指南: 响应参考: {
"url": "https://vlink.dev/api/v3/repos/EOEFANS/eoefans-mobile-flutter/releases/25",
"assets_url": "https://vlink.dev/api/v3/repos/EOEFANS/eoefans-mobile-flutter/releases/25/assets",
"upload_url": "https://vlink.dev/api/uploads/repos/EOEFANS/eoefans-mobile-flutter/releases/25/assets{?name,label}",
"html_url": "https://vlink.dev/EOEFANS/eoefans-mobile-flutter/releases/tag/v1.6.9",
"id": 25,
"author": {
"login": "github-actions[bot]",
"id": 3,
"node_id": "MDM6Qm90Mw==",
"avatar_url": "https://avatars.vlink.dev/u/2?",
"gravatar_id": "",
"url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D",
"html_url": "https://vlink.dev/github-apps/github-actions",
"followers_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/followers",
"following_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/repos",
"events_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"site_admin": false
},
"node_id": "MDc6UmVsZWFzZTI1",
"tag_name": "v1.6.9",
"target_commitish": "main",
"name": "v1.6.9",
"draft": false,
"prerelease": false,
"created_at": "2023-02-22T12:41:17Z",
"published_at": "2023-02-22T12:46:44Z",
"assets": [
{
"url": "https://vlink.dev/api/v3/repos/EOEFANS/eoefans-mobile-flutter/releases/assets/10",
"id": 10,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEw",
"name": "EOEFANS-v1.6.9.apk",
"label": null,
"uploader": {
"login": "github-actions[bot]",
"id": 3,
"node_id": "MDM6Qm90Mw==",
"avatar_url": "https://avatars.vlink.dev/u/2?",
"gravatar_id": "",
"url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D",
"html_url": "https://vlink.dev/github-apps/github-actions",
"followers_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/followers",
"following_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/repos",
"events_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://vlink.dev/api/v3/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"site_admin": false
},
"content_type": "application/vnd.android.package-archive",
"state": "uploaded",
"size": 62312066,
"download_count": 0,
"created_at": "2023-02-22T12:46:45Z",
"updated_at": "2023-02-22T12:46:45Z",
"browser_download_url": "https://vlink.dev/EOEFANS/eoefans-mobile-flutter/releases/download/v1.6.9/EOEFANS-v1.6.9.apk"
}
],
"tarball_url": "https://vlink.dev/api/v3/repos/EOEFANS/eoefans-mobile-flutter/tarball/v1.6.9",
"zipball_url": "https://vlink.dev/api/v3/repos/EOEFANS/eoefans-mobile-flutter/zipball/v1.6.9",
"body": ""
} |
Sign in
to join this conversation on GitHub.
目前CI/CD已实现了自动发布release的管道,同时在 release api中已提供了文件名。
可以利用该api进行轮询,提取其中的文件名并拼接下载url。
https://api.vlink.dev/repos/EOEFANS/eoefans-mobile-flutter/releases/latest
https://alist.vtb.link/d/EOEFANS/client/<文件名>.<扩展名>
The text was updated successfully, but these errors were encountered: