Skip to content

Server: refactor server code for readability and maintainability #66

Server: refactor server code for readability and maintainability

Server: refactor server code for readability and maintainability #66

Workflow file for this run

name: Build Server
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Build Linux
run: |
sudo apt-get update
sudo apt-get install -y libenet-dev
sudo apt-get install -y pkg-config
cd server && go build -o server main.go
if: matrix.os == 'ubuntu-latest'
- name: Build Windows
run: cd server && go build -o server.exe main.go
if: matrix.os == 'windows-latest'
- name: Upload artifacts
uses: actions/[email protected]
with:
name: server
path: ${{github.workspace}}/server
if-no-files-found: error