Skip to content

Commit

Permalink
added to nightly deploy. fixed build.sh fyne not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-Zheng committed Jan 24, 2025
1 parent 6d69efa commit f01cb7c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
41 changes: 21 additions & 20 deletions .github/actions/deploy-binary/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ inputs:
runs:
using: composite
steps:
- name: Build Binary
shell: bash
run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/scripts/build.sh"
# run the script
"${GITHUB_WORKSPACE}/scripts/build.sh"
env:
GCSIM_SHARE_KEY: ${{ inputs.shareKey }}

- name: Release Binary
uses: softprops/action-gh-release@v1
if: inputs.prerelease == 'true' || startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ inputs.prerelease == 'true' }}
tag_name: ${{ inputs.tag }}
files: |
LICENSE
gcsim.exe
server.exe
- name: Build Binary
shell: bash
run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/scripts/build.sh"
# run the script
"${GITHUB_WORKSPACE}/scripts/build.sh"
env:
GCSIM_SHARE_KEY: ${{ inputs.shareKey }}

- name: Release Binary
uses: softprops/action-gh-release@v1
if: inputs.prerelease == 'true' || startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ inputs.prerelease == 'true' }}
tag_name: ${{ inputs.tag }}
files: |
LICENSE
gcsim.exe
server.exe
gcsim_server.apk
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.shareKey=${SHARE_KEY}' -X m
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

go install fyne.io/fyne/v2/cmd/[email protected]
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 f01cb7c

Please sign in to comment.