Closed ZubisFFXI closed 1 year ago
You can see this on my fork at
Thanks. I've spent the last hour or so reading about workflows and releases since these are both new to me.
For the most part, your workflow file is simple and easy to follow. However, I don't understand why it needs to trigger on "pull_request" or "release." Isn't triggering on a push to "main" enough? I'd prefer it to only run the workflow when I update the code in the repository. I guess this would mean also updating the concurrency group to just ${{ github.ref }}
?
I still need to finish reviewing GitHub Releases, but it seems like the last bit of your workflow will automatically create a new release version of the GitHub repository and include the wsdist.zip packaged executable and necessary files/directories. Do I need to first create a v1.0.0 for the workflow to recognize it? Does it automatically iterate version number? I also see this is possible with https://github.com/rymndhng/release-on-push-action, but it seems that the env GITHUB_TOKEN
was listed as deprecated in the version of action-gh-release that you have in your workflow.
I'll keep looking into this later before I merge anything.
Re: pull_request:
It's a best practice concept called https://en.wikipedia.org/wiki/CI/CD
In short, you want the build to happen before the code is merged not after - on the creation of a pull request. That way you can be sure no-one's broken anything.
Because you're new to GitHub Actions, I've removed the release stuff from the code. You can always come back to it later. For now it just builds the artifacts.
Thank you 👍
Description
Currently the release artifact .exe is built by the developer and checked into the code as part of a standard commit. This is not recommended best practice on GitHub for several reasons:
Change
A GitHub Action file has been added to the repo. This will build and output the exe for download on the creation of a Pull Request, or merge of code to the main branch.
You can review the builds under Actions.
Future Work/Recommendations
I would advise you to delete the exe from the source code and use the GitHub Action going forward to generate the release. You can also create releases on GitHub (ie v1.0.0) and the artifact should upload into it.