RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
254 stars 140 forks source link

Repair Automated Builds workflow (again) #1111

Open cosmiccoincidence opened 1 year ago

cosmiccoincidence commented 1 year ago

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.

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 commented 1 year ago

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).