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/workflows
to create the main workflow directory - Copy the
.yml
files for your project's language to.github/workflows
- If your language has a
scripts
directory in it, then runmkdir scripts
and copy thescripts/
files into it. - Change any instance of
joeygibson
to your Github username. - Commit your changes, and check the
Actions
tab 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.