commit e03f55fd0f28dcb5f240e8d32e94df82417fc7bc
parent 1a0da7448be0c0888e40a1fc461962e3d4276740
Author: Andrea Feletto <andrea@andreafeletto.com>
Date: Sun, 29 May 2022 21:35:11 +0200
ci: package and upload on tagged commits
Diffstat:
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.build.yml b/.build.yml
@@ -1,5 +1,6 @@
image: archlinux
packages:
+ - hut
- zig
- wayland
- wayland-protocols
@@ -8,10 +9,16 @@ packages:
- libpulse
sources:
- https://git.sr.ht/~andreafeletto/levee
+secrets:
+ - 8a791f75-2c57-4cd6-8cae-710da7d992cc
tasks:
- submodules: |
cd levee
git submodule update --init
+ - package: |
+ cd levee
+ ./contrib/package || exit 0
+ hut git artifact upload *.tar.gz
- build: |
cd levee
zig build
diff --git a/contrib/package b/contrib/package
@@ -1,8 +1,8 @@
#!/bin/sh
-
set -e
-name="levee-$1"
-mkdir "$name"
+tag=$(git describe --exact-match)
+name="levee-${tag#v}"
+mkdir -p "$name"
git ls-files --recurse-submodules | xargs cp --parents -r -t "$name"
tar -cavf "$name.tar.gz" "$name"