Add github workflow to build application. #10
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" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: "true" | |
- name: Setup Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Install build dependency packages | |
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xorg-dev | |
- name: Go Generate | |
run: go generate ./... | |
- name: Build | |
run: go build -o ./build/lanty.exe -v ./cmd/ | |
- name: Get settings file | |
run: cp ./settings.yaml ./build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: lanty | |
path: ./build | |
if-no-files-found: error | |
retention-days: 1 | |
overwrite: "true" |