bevy_github_ci_template icon indicating copy to clipboard operation
bevy_github_ci_template copied to clipboard

Improve release workflow and readme

Open ameknite opened this issue 2 years ago • 7 comments

This PR improves the release workflow by adding:

  • Manual workflow dispatch
  • Setting environment variables to specify the desired build and release platforms.
  • Separating build and release jobs
  • Adding deployment to GitHub Pages.

This also improves the README and addresses (#14).

I tested it, and it works in this repository: https://github.com/ameknite/bevy_game itch.io page: https://ameknite.itch.io/bevy-game github pages: https://ameknite.github.io/bevy_game/

ameknite avatar Sep 19 '23 01:09 ameknite

I changed the environment variables and inputs to Strings instead of Booleans because GitHub doesn't allow more than 10 inputs in a manual workflow :/ (https://github.com/orgs/community/discussions/8774)

This way, when we add more build or publish targets, we won't hit the limit. I also think this looks better.

Screenshot 2023-09-21 at 14 33 24

ameknite avatar Sep 21 '23 21:09 ameknite

How does this behave when a user hasn't configured github pages or itch?

(Opinion) I feel like if a user has chosen to deploy to GH pages and GH pages is not configured, then they should see an error that points in the right direction. Ditto itch. If that's the case though, I don't think it makes sense to deploy to either of those platforms by default. Users using the workflow for the first time would just be bombarded with errors.

rparrett avatar Sep 22 '23 15:09 rparrett

@rparrett You are right, It was set up that way, I just added itchio and pages for testing and forgot to remove them. Fixed.

ameknite avatar Sep 22 '23 16:09 ameknite

What's the usecase for the manual workflow? Are users expected to set all the fields every time they use it, or to update the YAML to the settings they normally use? If it's the latter - wouldn't it be simpler and easier to use if the manual workflow only asks for the tag version, and does not allow modifying anything else?

idanarye avatar Sep 22 '23 23:09 idanarye

Well, I see environment variables as your default settings, which you want to maintain for every time you release a new version of your game.

I consider the manual workflow more flexible to allow testing a platform without having to change your default configuration

ameknite avatar Sep 23 '23 00:09 ameknite

Looks good to me, but I worry this takes the workflow over a complexity threshold...

Could you try splitting it in several files, using https://docs.github.com/en/actions/using-workflows/reusing-workflows?

mockersf avatar Sep 24 '23 00:09 mockersf

@mockersf I update the pr, now every build and release has its own file using workflow calls

ameknite avatar Oct 17 '23 07:10 ameknite