-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add Github actions of the release event. #238
Conversation
tomac4t
commented
Apr 17, 2020
- Github workflows file.
- Debian package script.
- Assets upload script.
大概的过程是发布一个新 Release (不能是草稿)会触发 Github actions 事件,在名为 ncipollo/release-action@v1 是根据 Tag 事件触发后,自动 create release,再上传 assets。功能很丰富,支持 Changelog。我认为它没法在多个 官方的 actions/upload-release-asset@v1 则更中规中举,REST API 需要什么就有哪些选项,所以无法像前者一样上传某一目录下所有 assets。 所以就用 python 自己写了上传脚本。 |
|
Q_Q 辛苦托马猫。 |
我理解这是为了以后可能有多个 artifacts 做准备?用多个 upload-release-assert steps 能不能做到呢? |
是的,目前只有 amd64 的包, i386 的包我还没搞明白。upload-release-assert 多个 step 确实可以,但还有一个问题是文件名不是固定的(debian 包生成的文件名取决于 changlog 的版本号和 CPU 架构;他们那边也有类似的 issue,Dynamic Filenames:actions/upload-release-asset#4 ),不过似乎可以通过环境变量获取,就是有些麻烦了。 |
- Github workflows file. - Debian package script. - Assets upload script.
明白了,既然他们还不够完善我们就用脚本吧,可以合了? |
我觉得可以合了,我新开了一个 Private 仓库(怕刷了太多时间线和邮件)测试,目前没有发现问题。 做几个记录:
|
release: | ||
types: [created] | ||
jobs: | ||
debiab-buster: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debiab-buster
这个 <job_id> 是我自己取的(也不知道合不合适),未来可以加更多 job
,比如用其他 docker 容器打其他发行版的包。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get it.