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

Rewrite CI #380

Draft
wants to merge 2 commits into
base: 1.21
Choose a base branch
from

Conversation

BrailleBennett
Copy link
Member

@BrailleBennett BrailleBennett commented Nov 7, 2024

Fixes #355, #373, #375
Closes #331

Push Workflow

graph TD
  start(["on: [push, pull_request]"])
  start --> build
  start --> test
  subgraph Build
  build(./gradlew clean build -x test)
  end
  subgraph Test
  test(./gradlew clean test)
  end
Loading

Release Workflow

graph TD
  start(["on: [workflow_dispatch], inputs: [version]"])
  start --> changelog
  subgraph Prepare
  changelog("Collate changelog from merged PRs without the 'released' or 'in-prerelease' labels")
  changelog --> weblate("Pull latest changes from Weblate")
  weblate --> commit_changelog("Write changelog to file and commit")
  commit_changelog --> tag("Create Git tag")
  tag --> push("Push")
  end
  subgraph Release
  push --> build("./gradlew clean :<loader>:build")
  build --> publish[["MC Publish"]]
  end
Loading

@khanshoaib3
Copy link
Collaborator

uhh...are we removing the fast-forward ci?

@TheSuperGamer20578
Copy link
Member

uhh...are we removing the fast-forward ci?

Yes, https://discord.com/channels/843921862194364468/1291343800547147788

@khanshoaib3
Copy link
Collaborator

Oh I see. I would've personally kept the fast-forward but I don't mind.
And I like the idea of collecting the changelogs from PRs in the release workflow.
What threshold are you using? Like how do you determine which PRs to keep?

@TheSuperGamer20578
Copy link
Member

What threshold are you using? Like how do you determine which PRs to keep?

I'm going to have it add a released or in-prerelease label to PRs during a release. Prereleases will contain changelogs from everything since the last prerelease (everything with neither label) and full releases will contain changelogs from everything since the last full release (everything without the released label). This means that users who don't follow Prereleases can still get meaningful changelogs. A side effect of this labelling is that it also makes it clear whether a PR has been included in a release yet.

I probably should've and probably still will document this properly in the PR description, I just wasn't thinking of it when I wrote the description.

Alternatively I could use the merged timestamp but then I would need to find when the previous release was which sounds hard but might be posible with Git tags.

@TheSuperGamer20578 TheSuperGamer20578 force-pushed the ci-refactor branch 13 times, most recently from 9f84f58 to 562c587 Compare November 9, 2024 08:58
@TheSuperGamer20578 TheSuperGamer20578 linked an issue Nov 12, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants