ci: automatically create github releases on tags
[ouch.git] / scripts / package-release-assets.sh
blobd9875abb7011c3ccae7a31fb4e77dbf72663ca95
1 #!/usr/bin/env bash
3 set -e
5 mkdir release
6 cd artifacts
8 for dir in ouch-*; do
9 cp -r artifacts "$dir/completions"
10 mkdir "$dir/man"
11 mv "$dir"/completions/*.1 "$dir/man"
12 cp ../{README.md,LICENSE,CHANGELOG.md} "$dir"
14 if [[ "$dir" = *.exe ]]; then
15 target=${dir%.exe}
16 mv "$dir" "$target"
17 zip -r "../release/$target.zip" "$target"
18 else
19 chmod +x "$dir/ouch"
20 tar czf "../release/$dir.tar.gz" "$dir"
22 done