Skip to content

Commit

Permalink
Added build and workflow for server apk
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-Zheng committed Jan 23, 2025
1 parent d9d0c81 commit 6d69efa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ jobs:
server_darwin_arm64
server_darwin_amd64
server_linux_amd64
gcsim_server.apk
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ server_windows_amd64.exe
server_darwin_arm64
server_darwin_amd64
server_linux_amd64
gcsim_server.apk
.venv
5 changes: 4 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ GOOS=linux GOARCH=amd64 go build -ldflags="-X 'main.shareKey=${SHARE_KEY}' -X ma
GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X main.version=`git tag --sort=-version:refname | head -n 1`" -o server_windows_amd64.exe ./cmd/server
GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X main.version=`git tag --sort=-version:refname | head -n 1`" -o server_darwin_arm64 ./cmd/server
GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X main.version=`git tag --sort=-version:refname | head -n 1`" -o server_darwin_amd64 ./cmd/server
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X main.version=`git tag --sort=-version:refname | head -n 1`" -o server_linux_amd64 ./cmd/server
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X main.version=`git tag --sort=-version:refname | head -n 1`" -o server_linux_amd64 ./cmd/server

cd cmd/server_andriod && GOFLAGS="'-ldflags=-X=main.version=`git tag --sort=-version:refname | head -n 1` \"-X=main.shareKey=${SHARE_KEY}\"'" fyne package -os android -appID com.gcsim.server -icon ../../ui/packages/ui/src/Images/logo.png --release --name "gcsim server" && cp gcsim_server.apk ../../gcsim_server.apk

0 comments on commit 6d69efa

Please sign in to comment.