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

auto release by github action #30

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ipcjs
Copy link
Contributor

@ipcjs ipcjs commented Mar 26, 2022

通过Github Action自动打包

tag名,我直接用的Makefile里面的VERSION=xxx,你这边要不要对应改下?

@felixonmars
Copy link
Owner

现在我是在仓库的同一个release里更新文件,因为仓库本身并没有更新。另外,web-slang-*.source 也需要同步更新。

@ipcjs
Copy link
Contributor Author

ipcjs commented Apr 1, 2022

web-slang-*.source 不是已经输出到zhwiki里了吗?为啥还要放到release的Assets里?🤔

@felixonmars
Copy link
Owner

web-slang-*.source 不是已经输出到zhwiki里了吗?为啥还要放到release的Assets里?thinking

用于提供给发行版打包作为 source (reproducible build)。

@ipcjs
Copy link
Contributor Author

ipcjs commented Apr 3, 2022

按你仓库的情况改了,应该可以了🤔️


jobs:
build:
runs-on: ubuntu-20.04
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

22.04/24.04/latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

系统版本无所谓吧,但一般不建议用latest,万一那天这个latest指向的版本更新了,也没人知道

artifacts: ${{ format('zhwiki-{0}.dict,zhwiki-{0}.dict.yaml,web-slang-{1}.source', steps.info.outputs.version, steps.info.outputs.web_slang_version) }}
bodyFile: "CHANGELOG.md"
commit: ${{ github.sha }}
tag: ${{ steps.info.outputs.tag }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release/tag对应的是代码版本,文件名是词汇更新时间?

有了这行是不是on下加个cron,它就能定期更新到当前release了

on:
  schedule:
    - cron: "30 0 * */1 *"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为现在发布版本的流程就是通过手动修改Makefile里面的版本号来做的,所以CI也写成了这样,只是替代了手动上传生成的文件,这一步而已

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants