yr/.build.yml
Tim Hårek Andreassen 23ce4a6e39
chore: Typo
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-10-26 19:34:25 +02:00

28 lines
855 B
YAML

image: alpine/edge
oauth: git.sr.ht/OBJECTS:RW git.sr.ht/REPOSITORIES:RO git.sr.ht/PROFILE:RO
packages:
- go
- make
- 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: |
make test
- build: |
tag=$(git describe --exact-match --tags HEAD 2>/dev/null || true)
if [ -z "$tag" ]; then
echo "Current commit is not a tag; not building anything"
complete-build
fi
make GOOS="darwin" ARCH="amd64" TAG=$tag build-release
make GOOS="dawrin" ARCH="aarch64" TAG=$tag build-release
make GOOS="linux" ARCH="amd64" TAG=$tag build-release
make GOOS="windows" ARCH="amd64" TAG=$tag build-release