Use this template to bootstrap the creation of a Golang action.:rocket:
This template includes compiliation support, tests, a validation workflow, publishing, and versioning guidance.
Click the Use this Template and provide the new repo details for your action
Install the dependencies
$ go mod downloadBuild the code
$ go buildRun the tests ✔️
$ go test -v ./...
=== RUN TestRunMain
--- PASS: TestRunMain (0.01s)
PASS
ok github.com/actions-go/go-action 0.315s
...Commit the pre-built binaries to ./dist/main_linux, ./dist/main_darwin and ./dist/main_windows.exe for respectively linux, mac OS and windows actions.
The action.yml contains defines the inputs and output for your action.
Update the action.yml with your name, description, inputs and outputs for your action.
See the documentation
Actions are run from GitHub repos. We will create a releases branch and only checkin production modules (core in this case).
$ git checkout -b releases/v1
$ git commit -a -m "prod dependencies"$ git commit -a -m "prod dependencies"
$ git push origin releases/v1Your action is now published! 🚀
See the versioning documentation
After testing you can create a v1 tag to reference the stable and tested action
uses: actions-go/go-action@master
with:
milliseconds: 1000