summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2022-01-29 21:55:39 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2022-01-29 21:55:39 +0100
commitcf14f822cf7e6114b8c306f2515a92df5c3c2df8 (patch)
tree496f60d48f5ca46a70d0ed938ecfaac6ff2c258c
parentce08ec62dbe59e439ea41974a4a9595327d71663 (diff)
downloadengarde-importer-cf14f822cf7e6114b8c306f2515a92df5c3c2df8.tar.gz
engarde-importer-cf14f822cf7e6114b8c306f2515a92df5c3c2df8.tar.bz2
engarde-importer-cf14f822cf7e6114b8c306f2515a92df5c3c2df8.zip
Build on windows and linux
-rw-r--r--.github/workflows/release.yml103
1 files changed, 58 insertions, 45 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1df3513..dddf21a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,56 +7,69 @@ on:
branches: [ master ]
jobs:
-
build:
name: Build
- runs-on: ubuntu-latest
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-2022]
env:
GOARCH: amd64
steps:
+ - name: Set up Go 1.17
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.17
+ id: go
+
+ - id: go-cache-paths
+ run: |
+ echo "::set-output name=go-build::$(go env GOCACHE)"
+ echo "::set-output name=go-mod::$(go env GOMODCACHE)"
+
+ - if: startsWith(matrix.os,'ubuntu')
+ name: Install Dependencies
+ run: |
+ sudo apt-get --allow-releaseinfo-change update
+ sudo apt-get install -y libglfw3-dev libfreetype6-dev
+
+ - name: Go Build Cache
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.go-cache-paths.outputs.go-build }}
+ key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
+
+ - name: Go Mod Cache
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.go-cache-paths.outputs.go-mod }}
+ key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
+
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Get dependencies
+ run: go get -v -t -d ./...
+
+ - name: Build
+ run: go build -v ./...
+
+ - name: Test
+ run: go test -v ./...
+
+ - name: Vet
+ run: go vet ./...
+
+ - name: Release Build
+ run: go build -ldflags '-s -w -H=windowsgui'
- - name: Set up Go 1.17
- uses: actions/setup-go@v2
- with:
- go-version: 1.17
- id: go
-
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Get dependencies
- run: go get -v -t -d ./...
-
- - name: Build (Windows)
- run: go build -v ./...
- env:
- GOOS: windows
-
- - name: Build (Linux)
- run: go build -v ./...
-
- - name: Test
- run: go test -v ./...
-
- - name: Vet
- run: go vet ./...
-
- - name: Release Build (Linux)
- run: go build -ldflags '-s -w' -o bin/engarde-importer
- env:
- GOOS: windows
-
- - name: Release Build (Windows)
- run: go build -ldflags '-s -w -H=windowsgui' -o bin/engarde-importer.exe
- env:
- GOOS: windows
-
- - name: Upload Release
- uses: ColinPitrat/update-release@v1.0.1
- id: update-release
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- files: bin/engarde-importer bin/engarde-importer.exe
- tag: release
+ - name: Upload Release
+ uses: ColinPitrat/update-release@v1.0.1
+ id: update-release
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ files: bin/*
+ tag: release