Ravo92 / Patch-2.22-Launcher

BFME Launcher for BFME, BFME 2, ROTWK. Also known as 2.22 Launcher for Battle for Middle Earth 1
MIT License
32 stars 3 forks source link

Don't try to create a release if it's a PR, since it will fail the pipeline #27

Closed dginovker closed 10 months ago

dginovker commented 10 months ago

This will still run the CI/CD to make sure it builds, but it won't make an artifact

Ravo92 commented 10 months ago

Can you please further explain what this code is doing or not doing? I do not understand this if case.

dginovker commented 10 months ago

Basically CICD won't try to publish a new release at https://github.com/Ravo92/Patch-2.22-Launcher/releases unless it's running code on the main branch.

If you look at https://github.com/Ravo92/Patch-2.22-Launcher/pull/26 you can see the CICD failed in that PR, because the PR tried to automatically create a new release, but since the PR came from me and I don't have permission to make a new release, the pipeline failed.

In this PR, the pipeline isn't failing, because it's not trying to create a new release

dginovker commented 10 months ago

Once you merge this PR though (or any future PR that has this code), the main will still kick off and make a new release afterwards

Ravo92 commented 10 months ago

Thank you kind sir.