Skip to content

Commit

Permalink
versioned release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Feb 1, 2024
1 parent 7b4fdcb commit 130fe55
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: pub
on:
push:
tags: ['*']
tags: ["*"]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
Expand All @@ -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:
Expand Down
30 changes: 21 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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/*
2 changes: 1 addition & 1 deletion src/eldur.kbitx
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@
<g u="665" x="0" y="5" w="5" d="BQQBQsUA/wD/AEUCRAE"/>
<g u="666" x="0" y="5" w="5" d="BQQBQsIA/wLE/wD/AEICwv8AQgE"/>
<g u="667" x="0" y="6" w="5" d="BgQDwv8AQsIA/wPC/wBDAsL/AEIB"/>
<g u="668" x="0" y="5" w="5" d="BQQDQgJCAUQBQgJB"/>
<g u="668" x="0" y="5" w="5" d="BQRBAkICRgJCAkE"/>
<g u="669" x="0" y="7" w="5" d="CgQCQQdBAkIDQQNBA0ECRMIA/wJBAg"/>
<g u="670" x="0" y="5" w="5" d="CARBAsn/AP8A/wD/AP8CQsQA/wD/A0EDQQNB"/>
<g u="671" x="0" y="5" w="5" d="BQRBA0EDQQNBAsL/AEM"/>
Expand Down

0 comments on commit 130fe55

Please sign in to comment.