Skip to content

Commit

Permalink
.github: cd: build with version infos
Browse files Browse the repository at this point in the history
  • Loading branch information
yuk7 committed Jul 13, 2021
1 parent 722f063 commit cc093f4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ jobs:
- uses: actions/checkout@v2
- name: Build
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
export PATH=$PATH:~/go/bin
cd src
env GOOS=windows GOARCH=amd64 go build
goversioninfo
env GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/yuk7/wsldl/version.version=${VERSION}"
touch distro.txt
for f in ../res/*;do
if [ -d "$f" ]; then
echo $f >> distro.txt
fi
done
curl -sSfLO https://github.com/akavel/rsrc/releases/download/v0.10.2/rsrc_linux_amd64
chmod +x rsrc_linux_amd64
cat distro.txt | while read line;do
distro="$(echo ${line} | cut -f 3 -d'/')"
./rsrc_linux_amd64 -ico ${line}/icon.ico -o ${distro}.syso
env GOOS=windows GOARCH=amd64 go build -o ${distro}.exe
goversioninfo -icon ${line}/icon.ico -o ${distro}.syso
env GOOS=windows GOARCH=amd64 go build -o ${distro}.exe -ldflags "-X github.com/yuk7/wsldl/version.version=${VERSION}"
rm -rf ${distro}.syso
done
- name: move wsldl to ../
Expand Down

0 comments on commit cc093f4

Please sign in to comment.