yr/.build.yml

29 lines
855 B
YAML
Raw Normal View History

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