-
Notifications
You must be signed in to change notification settings - Fork 1
Pre‐built static binaries
Generally, for things that are static binaries (already compiled), we'll just use the latest Ubuntu Docker image.
We use GoReleaser Pro to configure how the package is built. This allows us to define some shared configuration, so that we only need to implement the things that are specific to this package.
This will allow us to build .apk, .deb, and .rpm packages for both linux/amd64 and linux/arm64 builds.
For packages that already publish builds as GitHub releases, we use download-asset to download the asset, extract it, and pull out the binary we care about.
To do this, we define a new download.sh file. This file calls download-asset to perform the downloads. The download.sh file is executed by GoReleaser as a pre-build step.
You'll need a few pieces of information.
- The name of the binary.
- The
owner/repositoryof the GitHub repository. - The URL for the project (might be the GitHub URL).
- The software license for the project.
- The description of the project (often in the upper-right of the project page).
- The pattern for the release asset.
- Determine an appropriate Cron expression for scheduled updates.
From the root of the repository, you can run:
go run generate-workflow.go \
-t _download-and-package.gotmpl.yml \
-p {package} \
-r '{owner/repository}' \
-c '{cron-expression}' \
;TBD
Content licensed under CC BY-SA.