【发布时间】:2019-12-24 10:14:29
【问题描述】:
我知道git archive 可以在机器上本地创建存储库的存档文件。我想将它在线存储在我的存储库中。
例如,看下面的链接:
https://github.com/opencv/opencv_contrib/archive/3.4.6.tar.gz
如您所见,存档存储在 git 存储库中。我怎样才能在 gitlab 或 github 中做到这一点?
【问题讨论】:
我知道git archive 可以在机器上本地创建存储库的存档文件。我想将它在线存储在我的存储库中。
例如,看下面的链接:
https://github.com/opencv/opencv_contrib/archive/3.4.6.tar.gz
如您所见,存档存储在 git 存储库中。我怎样才能在 gitlab 或 github 中做到这一点?
【问题讨论】:
您的链接指向 GitHub “发布”。该功能也存在于 Gitlab 中,但目前,您只能通过 Releases API 创建 Release 条目;建议将其作为 CI/CD 发布管道中的最后一步之一。
GitLab 发布:https://docs.gitlab.com/ee/user/project/releases/index.html
GitHub 发布:https://help.github.com/en/articles/creating-releases
【讨论】: