should be working builds
This commit is contained in:
@@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: artifact builds on linux and windows
|
||||||
env:
|
env:
|
||||||
RUNNER_TOOL_CACHE: /toolcache
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -23,7 +24,28 @@ jobs:
|
|||||||
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
||||||
|
|
||||||
- name: build-linux
|
- 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
|
- 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/
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and Test Vulture
|
name: build and run tests
|
||||||
env:
|
env:
|
||||||
RUNNER_TOOL_CACHE: /toolcache
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -18,21 +18,29 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- name: setup-dependencies
|
- name: setup dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
||||||
- name: Build
|
- name: build
|
||||||
run: go build -v ./...
|
run: |
|
||||||
- name: Run Tests
|
VERSION=${{github.ref_name}}
|
||||||
|
BUILD=${{github.run_number}}
|
||||||
|
GOOS=linux
|
||||||
|
GOARCH=amd64
|
||||||
|
GOFLAGS="-ldflags=-s -ldflags=-w"
|
||||||
|
CGO_ENABLED=1
|
||||||
|
CC=gcc
|
||||||
|
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/swiped-mod-switcher-${VERSION}.${BUILD}-linux-amd64 main.go
|
||||||
|
- name: run tests
|
||||||
run: go test -v ./...
|
run: go test -v ./...
|
||||||
- name: Check Vet
|
- name: Check Vet
|
||||||
run: go vet ./...
|
run: go vet ./...
|
||||||
- name: Check Formatting
|
- name: check formatting
|
||||||
run: |-
|
run: |-
|
||||||
gofmt -s -l .
|
gofmt -s -l .
|
||||||
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
|
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
|
||||||
- name: Check Lint
|
- name: check lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
name: release
|
name: release-tag
|
||||||
|
on:
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -19,13 +18,30 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
apt-get install -y gcc-mingw-w64 gcc libgl1-mesa-dev xorg-dev
|
||||||
- name: release-build-linux
|
|
||||||
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-linux-amd64
|
- name: build-linux
|
||||||
- name: release-build-windows
|
run: |
|
||||||
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-windows-amd64.exe
|
VERSION=${{github.ref_name}}
|
||||||
- name: release-build-darwin
|
BUILD=${{github.run_number}}
|
||||||
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 's1d3sw1ped/vulture/config.BuildVersion=${{github.ref_name}}'" -o bin/vulture-${{github.ref_name}}-darwin-amd64
|
GOOS=linux
|
||||||
- name: update-release
|
GOARCH=amd64
|
||||||
|
GOFLAGS="-ldflags=-s -ldflags=-w"
|
||||||
|
CGO_ENABLED=1
|
||||||
|
CC=gcc
|
||||||
|
fyne package --appVersion=${VERSION} --appBuild=${BUILD} --exe bin/sw1ped-mod-switcher-${VERSION#v}.${BUILD}-linux-amd64 main.go
|
||||||
|
|
||||||
|
- name: build-windows
|
||||||
|
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/sw1ped-mod-switcher-${VERSION#v}.${BUILD}-windows-amd64.exe main.go
|
||||||
|
|
||||||
|
- name: add-release-binaries
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
|
|||||||
Reference in New Issue
Block a user