Default server port changed to 8080 #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-windows: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: "true" | |
- name: Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Setup build environment | |
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends --no-install-suggests gcc-mingw-w64-x86-64 | |
- name: Build | |
run: GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-win32 go build -o ./build/lanty-server.exe -v ./cmd | |
- name: Package | |
run: | | |
cp ./settings.yaml ./build | |
mkdir ./build/game-config ./build/game-icon ./build/game-data ./build/download | |
touch ./build/game-config/.keep-me ./build/game-icon/.keep-me ./build/game-data/.keep-me ./build/download/.keep-me | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lanty-server | |
path: ./build | |
if-no-files-found: error | |
retention-days: 1 | |
overwrite: "true" | |
release: | |
if: github.ref_type == 'tag' | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
- name: Zip artifact | |
uses: vimtor/[email protected] | |
with: | |
files: ./lanty-server | |
dest: lanty-server.zip | |
- name: Create Release | |
if: | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
lanty-server.zip | |
generate_release_notes: true | |
needs: build-windows |