2024-10-03 17:32:53 +00:00
|
|
|
image: alpine/edge
|
2024-10-03 18:01:32 +00:00
|
|
|
oauth: git.sr.ht/OBJECTS:RW git.sr.ht/REPOSITORIES:RO git.sr.ht/PROFILE:RO
|
2024-10-03 17:32:53 +00:00
|
|
|
packages:
|
|
|
|
- go
|
2024-10-26 17:04:22 +00:00
|
|
|
- make
|
2024-10-03 17:32:53 +00:00
|
|
|
- hut
|
|
|
|
sources:
|
|
|
|
- git@git.sr.ht:~timharek/yr
|
|
|
|
triggers:
|
|
|
|
- action: email
|
|
|
|
condition: failure
|
|
|
|
to: Tim Hårek Andreassen <tim@harek.no>
|
|
|
|
tasks:
|
|
|
|
- setup: |
|
|
|
|
echo 'cd yr' >> ~/.buildenv
|
|
|
|
- test: |
|
2024-10-26 17:04:22 +00:00
|
|
|
make test
|
2024-10-03 17:32:53 +00:00
|
|
|
- build: |
|
2024-10-03 17:59:28 +00:00
|
|
|
tag=$(git describe --exact-match --tags HEAD 2>/dev/null || true)
|
2024-10-03 17:32:53 +00:00
|
|
|
if [ -z "$tag" ]; then
|
|
|
|
echo "Current commit is not a tag; not building anything"
|
2024-10-03 18:21:24 +00:00
|
|
|
complete-build
|
2024-10-03 17:32:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
version=$(echo "$tag" | tr -d 'v')
|
|
|
|
|
2024-10-26 17:04:22 +00:00
|
|
|
make GOOS="darwin" ARCH="amd64" build-release
|
|
|
|
make GOOS="dawrin" ARCH="aarch64" build-release
|
|
|
|
make GOOS="linux" ARCH="amd64" build-release
|
|
|
|
make GOOS="windows" ARCH="amd64" build-release
|