38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Build for Windows
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set env
|
|
run: if grep -Fxq "devel" cmd/go2tv/version.txt;then echo "GO2TV_VERSION=$(cat cmd/go2tv/version.txt)";else echo "GO2TV_VERSION=v$(cat cmd/go2tv/version.txt)";fi >> $GITHUB_ENV
|
|
|
|
- uses: WillAbides/setup-go-faster@v1.11.0
|
|
id: setup-go-faster
|
|
with:
|
|
go-version: "*"
|
|
|
|
- name: Get dependencies
|
|
run: sudo apt update && sudo apt install gcc xorg-dev gcc-mingw-w64
|
|
|
|
- name: Install fyne
|
|
run: go install fyne.io/fyne/v2/cmd/fyne@latest
|
|
|
|
- name: Package (Windows)
|
|
run: cd cmd/go2tv && CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ fyne package --release --appID app.go2tv.go2tv -os windows -icon ../../assets/go2tv-icon.png && mv go2tv.exe ../../
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: go2tv_${{ env.GO2TV_VERSION }}_windows_amd64
|
|
path: |
|
|
LICENSE
|
|
README.md
|
|
go2tv.exe
|
|
retention-days: 2
|