Skip to content

Build Golang Server #23

Build Golang Server

Build Golang Server #23

Workflow file for this run

name: Build Golang Server
on:
# pull:
# branches: [main]
workflow_dispatch:
jobs:
Build-Server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
uses: crazy-max/ghaction-xgo@v2
with:
xgo_version: latest
go_version: latest
dest: build
prefix: vtablet
targets: windows/amd64,windows/386
# targets: windows/amd64,windows/386,linux/amd64,darwin/amd64,darwin/arm64
v: true
x: true
race: false
ldflags: -H=windowsgui -s -w
buildmode: default
trimpath: true
working_dir: ./server
- name: Run UPX
uses: crazy-max/ghaction-upx@v2
with:
version: latest
files: |
server/build/*.exe
args: --best
- uses: actions/upload-artifact@v3
with:
name: vTablet_server_windows_386
path: server/build/vtablet-windows-386.exe
- uses: actions/upload-artifact@v3
with:
name: vTablet_server_windows_amd64
path: server/build/vtablet-windows-amd64.exe