scotty/.build.yml
2023-11-28 18:13:41 +01:00

27 lines
651 B
YAML

image: archlinux
packages:
- go
- goreleaser-bin
- hut
oauth: pages.sr.ht/PAGES:RW
tasks:
- test: |
cd scotty
go build -v .
go test -v ./...
- build: |
cd scotty
GIT_REF=$(git describe --always)
if [[ "$GIT_REF" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]
then
goreleaser release --clean
else
goreleaser release --snapshot --clean
fi
cd dist/
tar cvf artifacts.tar scotty-*.{gz,zip} scotty_*_checksums.txt
- publish-redirect: |
# Update redirect on https://go.uploadedlobster.com/scotty
./scotty/pages/publish.sh
artifacts:
- scotty/dist/artifacts.tar