SS3D icon indicating copy to clipboard operation
SS3D copied to clipboard

Repair Automated Builds workflow (again)

Open cosmiccoincidence opened this issue 1 year ago • 1 comments

Summary

This old thing? Yep. Time to repair the automated builds workflow again.

Goal

Several things have changed since the last time we had this running so I'm sure there's some updating to do.

  • The primary change has been to the builds themselves & where the game should build to. More info: #1028
  • Also the branch name itself changed from 'main' to 'develop'.
  • And we also removed the "RE:" from the build name.

More

Can we be more precise with the trigger? it would be preferred if the script was called when someone updated (via merged pr) the project version in the project settings in Unity. Then the script could detect that version number and set it to the github release tag automatically.

(Might not be the best method though because someone could try to sneak in a change to the project version in a larger pr and mess things up. Maybe we can make the file/variable admin-only.)

Automate description too. (See comment below)

File

We should rename the file to AutomatedBuild

https://github.com/RE-SS3D/SS3D/blob/develop/.github/workflows/main.yml

cosmiccoincidence avatar Mar 14 '23 04:03 cosmiccoincidence

Automated Description

This part can be done separately from the primary task.

One of the downsides of the previous automated builds was that it did not have any description. Imo, this is unsatisfactory. Most projects provide a list of changes and usually some basic info in their releases, so for a while I've just been adding a list of changes manually.

Recently I realized there is a "Generate Release Notes" button which auto generates the changelog in the description for you and even links the contributors. I also begun formatting the description to make the release themselves look nicer and provide some stats & info.

It would be important to automate as much of the new description as possible.

Instructions

The workflow will need to know which fields to populate. The workflow will first get the project version field from the project settings, then create a release using the project version as the tag.

Now that it has the tag, it needs to determine the previous tag numerically (this is important later).

Then populate the title as SS3D: [tag] - [date:m.d.y].

Then populate the description using a template file (not made yet). There will be several spots in the description to add the current and previous tags to in order to make the stats, changelog, etc work.

The release itself also has a hard-coded field to input the previous tag into. Add the previous tag to it (this can be done earlier). Then AT THE BOTTOM of the description, generate release notes.

Finally, at the bottom of the description, below the auto-generated release notes, add a line with </details> (this closes the auto-generated change notes in a dropdown).

cosmiccoincidence avatar Apr 28 '23 05:04 cosmiccoincidence