should be working builds
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: artifact builds on linux and windows
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
runs-on: ubuntu-latest
|
||||
@@ -23,7 +24,28 @@ jobs:
|
||||
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
||||
|
||||
- name: build-linux
|
||||
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=gcc go build -v -ldflags="-s -w -X 'main.Version=${{github.ref_name}}'" -o bin/sw1ped-mod-switcher-${{github.ref_name}}-linux-amd64
|
||||
|
||||
run: |
|
||||
VERSION=${{github.ref_name}}
|
||||
BUILD=${{github.run_number}}
|
||||
GOOS=windows
|
||||
GOARCH=amd64
|
||||
GOFLAGS="-ldflags=-s -ldflags=-w"
|
||||
CGO_ENABLED=1
|
||||
CC=gcc
|
||||
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-linux-amd64 main.go
|
||||
|
||||
- name: build-windows
|
||||
run: GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -v -ldflags="-s -w -X 'main.Version=${{github.ref_name}}'" -o bin/sw1ped-mod-switcher-${{github.ref_name}}-windows-amd64.exe
|
||||
run: |
|
||||
VERSION=${{github.ref_name}}
|
||||
BUILD=${{github.run_number}}
|
||||
GOOS=windows
|
||||
GOARCH=amd64
|
||||
GOFLAGS="-ldflags=-H=windowsgui -ldflags=-s -ldflags=-w"
|
||||
CGO_ENABLED=1
|
||||
CC=x86_64-w64-mingw32-gcc
|
||||
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-$VERSION-windows-amd64.exe main.go
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: swiped-mod-switcher-${{github.ref_name}}
|
||||
path: bin/
|
||||
Reference in New Issue
Block a user