These are reusable Github Action script for building projects in various langauges, for Linux, macOS, and Windows.
The build.yml file is run whenever a commit happens. It builds and tests the project
The release.yml file is run when a Git tag is present. It builds just like build.yml, but when done, it will create a release, and upload the artifacts.
These scripts work for me, though I don't claim they are perfect. If you have suggestions to make them better, please send me a pull request.
- Rust
- Go
- Kotlin/Java using Gradle
- Kotlin/Java using Maven
- In your project, run
mkdir -p .github/workflowsto create the main workflow directory - Copy the
.ymlfiles for your project's language to.github/workflows - If your language has a
scriptsdirectory in it, then runmkdir scriptsand copy thescripts/files into it. - Change any instance of
joeygibsonto your Github username. - Commit your changes, and check the
Actionstab in the Github UI for your project
Note: You may need to adjust the scripts depending on whether you use master, or the new main branch that Github is moving to.