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

build & ci: Setup version naming scheme & auto release CI #18

Merged
merged 18 commits into from
Aug 31, 2023
Merged

build & ci: Setup version naming scheme & auto release CI #18

merged 18 commits into from
Aug 31, 2023

Conversation

Cubik65536
Copy link
Collaborator

@Cubik65536 Cubik65536 commented Aug 30, 2023

Description/描述

This Pull Request contains:

  1. Changing the version naming scheme from version+date (e.g. 0.1+20230830) to version.patch-git_sha-stage (e.g. 0.1.62+f752f4c-dev), where as patch, git_sha and stage will be get automatically during builds.
    • This change have been made to make sure it's easier to correspond a GitHub Release to a release artifact file. I DON'T think this will have a huge (and bad) impact on the ease of distinguishing versions.
  2. Setup a CI action to automatically build beta version and publish to (as pre-release):
    • GitHub Releases
    • Modrinth
    • CurseForge
  3. Setup a CI action to automatically build stable version and publish to (as official & latest release):
    • GitHub Releases
    • Modrinth
    • CurseForge
  4. Setup a CI action to automatically build dev build from Pull Request (and NOT publish).

Related Issues/相关的 issue

  • n/a

Checklist/清单

  • Setup new version naming scheme
  • Setup PR dev release CI
  • Setup beta release CI
    • Build
    • Release to GitHub
    • Release to Modrinth
    • Release to CurseForge
  • Setup stable release CI
    • Build
    • Release to GitHub
    • Release to Modrinth
    • Release to CurseForge
  • The issues this PR addresses are related to each other/此 PR 解决的 issue 是相关的
  • My changes are all related to the related issue above/我的修改都与上方的相关 issue 有关
  • My changes generate no new warnings/我的修改没有产生新的警告
  • My code builds and runs on my machine/我的代码在我的电脑上可以编译和运行
  • I documented my code/我已经为我的代码添加了注释/文档

Screenshots

n/a

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
build.gradle Show resolved Hide resolved
@zly2006
Copy link
Owner

zly2006 commented Aug 31, 2023

I still want to show build time in version number so I can easily see if a bug report is using the latest version.

You can add build time to only beta or snapshot versions.

@Cubik65536
Copy link
Collaborator Author

I still want to show build time in version number so I can easily see if a bug report is using the latest version.

You can add build time to only beta or snapshot versions.

I personally don't recommend to do that, especially when the built time does not directly correspond to a version, but if you really want it I might add a environment variable to control that.

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
@zly2006
Copy link
Owner

zly2006 commented Aug 31, 2023

well, it's ok to use commit hash, but if you don't like build time github action id is also ok, i just want to know if players are using the latest version. e.g. x.x.x-aaa+build.<action id>

@Cubik65536
Copy link
Collaborator Author

well, it's ok to use commit hash, but if you don't like build time github action id is also ok, i just want to know if players are using the latest version. e.g. x.x.x-aaa+build.<action id>

Yeah I'll put the CI ID at the end if it's generated by GitHub CI. BTW, this is only on beta isn't it?

@zly2006
Copy link
Owner

zly2006 commented Aug 31, 2023

ok, great job

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
@Cubik65536 Cubik65536 marked this pull request as ready for review August 31, 2023 23:19
@Cubik65536
Copy link
Collaborator Author

Ready for review @zly2006
Recommended to wait till all actions checks.

@zly2006 zly2006 merged commit e855ae2 into zly2006:1.20 Aug 31, 2023
2 checks passed
@Cubik65536 Cubik65536 deleted the ci/add-build-release-ci branch September 4, 2023 03:25
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.

2 participants