diff --git a/.github/workflows/pub.yml b/.github/workflows/pub.yml
index b09d429..d114a0d 100644
--- a/.github/workflows/pub.yml
+++ b/.github/workflows/pub.yml
@@ -2,7 +2,7 @@
name: pub
on:
push:
- tags: ['*']
+ tags: ["*"]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
@@ -21,7 +21,9 @@ jobs:
- name: deps
run: sudo apt install bdfresize
- name: build
- run: ./build.sh && cp LICENSE out
+ env:
+ TAG: ${{ github.event.release.tag_name }}
+ run: ./build.sh -v "$TAG"
- name: Release
uses: svenstaro/upload-release-action@2.7.0
with:
diff --git a/build.sh b/build.sh
index 833e51b..8f85839 100755
--- a/build.sh
+++ b/build.sh
@@ -1,19 +1,31 @@
#!/bin/bash -e
+while getopts ":v:" o; do
+ case $o in
+ v)
+ [ "$OPTARG" != "" ] && v="_$OPTARG"
+ ;;
+ *) ;;
+ esac
+done
+
rm -rf out
mkdir -p deps out
[ ! -f deps/BitsNPicas.jar ] && wget -O deps/BitsNPicas.jar "https://github.com/kreativekorp/bitsnpicas/releases/latest/download/BitsNPicas.jar"
-# kbitx to bdf
-java -jar deps/BitsNPicas.jar convertbitmap -f bdf -o ./out/eldur.bdf ./src/eldur.kbitx
-bdfresize -f 2 ./out/eldur.bdf >./out/eldur_2x.bdf
+cp LICENSE out
+
+# kbitx -> bdf
+java -jar deps/BitsNPicas.jar convertbitmap -f bdf -o "out/eldur$v.bdf" src/eldur.kbitx
+bdfresize -f 2 "out/eldur$v.bdf" >"out/eldur_2x$v.bdf"
-# kbitx to otb
-java -jar deps/BitsNPicas.jar convertbitmap -f otb -o ./out/eldur.otb ./src/eldur.kbitx
-bdfresize -f 2 ./out/eldur.bdf >./out/eldur_2x.otb
+# kbitx -> otb
+java -jar deps/BitsNPicas.jar convertbitmap -f otb -o "out/eldur$v.otb" src/eldur.kbitx
+bdfresize -f 2 "out/eldur$v.bdf" >"out/eldur_2x$v.otb"
-# kbitx to ttf
-java -jar deps/BitsNPicas.jar convertbitmap -f ttf -o ./out/eldur.ttf ./src/eldur.kbitx
+# kbitx -> ttf
+java -jar deps/BitsNPicas.jar convertbitmap -f ttf -o "out/eldur$v.ttf" src/eldur.kbitx
-rm -f ./out/*.afm
+rm -f out/*.afm
+zip -r "out/eldur$v.zip" out/*
diff --git a/src/eldur.kbitx b/src/eldur.kbitx
index 68a45c9..345ea27 100644
--- a/src/eldur.kbitx
+++ b/src/eldur.kbitx
@@ -622,7 +622,7 @@
-
+