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

Update github build workflow [skip ci] #2424

Merged
merged 4 commits into from
Mar 20, 2023
Merged

Update github build workflow [skip ci] #2424

merged 4 commits into from
Mar 20, 2023

Conversation

breadbyte
Copy link
Member

@breadbyte breadbyte commented Feb 5, 2023

This PR makes the following changes to the build and publish workflow:

  • Replace nanzm/get-time-action with the built-in linux command date.
  • Remove the use of actions/setup-dotnet since all github runners already include the latest .NET SDK (7.0.102 is available at the Ubuntu 22.04 runner at this time, both are the latest as of this writing.)
  • Simplify the addition of new build targets. Instead of having to write extensive boilerplate code, the build target can now be added to a list of build targets, and a release build with that target will automatically be generated.
    • As a benefit of streamlining the build process, we are now able to build each target in parallel, significantly reducing our build times.
  • The translation keys are fetched and cached per commit build to save on time. The translation cache can be manually deleted before its TTL in the Actions area, under Caches. The TTL for Caches is 7 days.
    • An alternative to caching per commit would be to cache per day, in which we could make a scheduled github action to update the translation cache every day.
  • The build will fail when the translation keys cannot be fetched from Crowdin.
    • Given that we have the translation cache, we can simply use the last available cache. This would supplement the previous idea of a per-day update of the translation cache.
  • The translation keys are now no longer fetched whenever the target repository is not MCCTeam's repository, as fetching the translations require Crowdin secrets. (this helps me debug the workflow and run my own builds)
  • The DOTNET_NOLOGO environment variable is set to true. This disables the .NET Welcome messages in the logs.
  • Changed the ${{ env.build-version-info }} in the current release for the short commit hash instead. I personally think that the commit sha is more useful for debugging than the date of build. On second thought, I think that the date of build works fine and is more user-friendly than showing the commit sha itself, reverted the change in 8e23018

- flip jobs order to make the build job at the top of the file, to simplify making changes build changes (since all the build parameters are at the top of the file)
- fixed an issue with the `determine-build` job
- fix build-version-info bug and revert build naming to previous convention
- implement transition version as discussed on discord
@breadbyte
Copy link
Member Author

Added the transition version into the builds.

This is the entire build matrix:
image

@ReinforceZwei
Copy link
Member

Is this ready to merge into master? I would like to merge PR #2430 and use new build workflow for releasing.

@breadbyte
Copy link
Member Author

I forgot I had this PR still open. Yes, it is mergeable.

@breadbyte breadbyte merged commit 0aa117d into master Mar 20, 2023
@ReinforceZwei
Copy link
Member

The workflow for fetching translation failed. (https://github.com/MCCTeam/Minecraft-Console-Client/actions/runs/4476842516/jobs/7867644294)

@breadbyte breadbyte deleted the breadbyte-patch-1 branch March 23, 2023 01:37
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.

None yet

2 participants