Amegma / Galaxy-Attack

An inspiration of the original Atari Space Invaders game built in pygame :space_invader: :video_game:
MIT License
40 stars 20 forks source link

Automate Releases #42

Open Mayank0255 opened 2 years ago

Mayank0255 commented 2 years ago

The manual method:

  1. When a developer writes code, the developer has to ensure that he/she has used resource_path() util for loading the assets, be it of any type.
  2. Run pyinstaller.exe .\main.spec --onefile --noconsole
  3. After the execution of the above command a main.exe file will be generated at ./dist directory, which has to be taken and be uploaded manually to the release as a binary.
  4. Then a new tag is created for the release in which the format is Major.minor.patch
nkitsaini commented 1 year ago

@Mayank0255 I can take a stab at this. I don't think CI can help with first point, that'll have to be taken care by developer. But all the others are easy to do.

But before that I think we should add setup.py to the project. It'll give us two benefits:

  1. A proper place to write down version number in
  2. Allow the project to be published on pypi

Flow: We will have a release branch. Whenever this branch gets updated, CI will check setup.py for version tag. If version has not been updated, CI will fail. Otherwise it'll go ahead and build main.exe and make a release tag on github (adding Changelog from new PRs).

Alternative Flow: A new github release is created whenever a git tag is pushed matching release/*. It will just build main.exe and use tag message to fill in release description.

Mayank0255 commented 1 year ago

@nkitsaini

Sorry for the late reply, I got busy with work.

Nice idea. I think the second flow is better as in the first flow the problem would be to keep on changing the version in the code itself, which is slightly harder to maintain.

Should I assign it to you then?

nkitsaini commented 1 year ago

@Mayank0255 Makes sense. Yeah, you can assign to me.