Skip to content

ci: update build workflow #3

ci: update build workflow

ci: update build workflow #3

Workflow file for this run

name: Build
on:
push:
branches:
- 'master'
tags:
- '*'
env:
APP_NAME: godnstray
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install
run: |
sudo apt-get install -y gcc libgtk-3-dev libayatana-appindicator3-dev
go mod tidy
go install github.com/tc-hib/go-winres@latest
- name: Build for Linux
run: go build -o dist/${{ env.APP_NAME }}-linux-amd64
- name: Build for Windows
run: |
go-winres simply --icon icon/icon.png
go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}.exe
GOARCH=arm go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}-arm.exe
GOARCH=arm64 go build -ldflags "-H=windowsgui" -o dist/${{ env.APP_NAME }}-arm64.exe
env:
GOOS: windows
GOARCH: amd64
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./dist/