Skip to content

txlogger 2.0.0 (#19) #36

txlogger 2.0.0 (#19)

txlogger 2.0.0 (#19) #36

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build Windows Release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest]
include:
- os: windows-latest
vcpkgCommitId: '4239bc3a50014b8e6a5a2a59df1fff3b7469543b'
steps:
- uses: actions/checkout@v4.2.2
with:
submodules: recursive
#- run: choco uninstall mingw -y --force
- run: choco install mingw -y --x86 --force
- name: Install libusb using Vcpkg
run: |
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install libusb:x86-windows
cd..
copy D:\\a\\txlogger\\txlogger\\vcpkg\\installed\\x86-windows\\bin\libusb-1.0.dll .\
- name: Set up Go
uses: actions/setup-go@v5.1.0
with:
go-version: '1.23'
cache: false
- name: Install dependencies
run: |
go get .
go install fyne.io/fyne/v2/cmd/fyne@develop
- name: Build
env:
PKG_CONFIG_PATH: "D:\\a\\txlogger\\txlogger\\vcpkg\\packages\\libusb_x86-windows\\lib\\pkgconfig"
CGO_CFLAGS: "-ID:\\a\\txlogger\\txlogger\\vcpkg\\packages\\libusb_x86-windows\\include\\libusb-1.0"
GOARCH: 386
GOOS: windows
CGO_ENABLED: 1
CC: i686-w64-mingw32-gcc
CXX: i686-w64-mingw32-g++
run: |
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
$Env:PATH += ";C:\ProgramData\mingw64\mingw32\bin"
fyne package -tags combi --release
# go build -tags combi -ldflags "-H=windowsgui" -o txlogger.exe
#
- name: Creating Zip
if: startsWith(github.ref, 'refs/tags/')
run: 7z a txlogger.zip txlogger.exe libusb-1.0.dll
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_REPOSITORY: roffe/txlogger
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
txlogger.zip