2022-06-17 14:12:49 +00:00
|
|
|
name: build-msi (windows)
|
2022-05-17 10:14:59 +00:00
|
|
|
|
|
|
|
on:
|
2023-01-13 13:16:17 +00:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- prereleased
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/**
|
|
|
|
paths:
|
|
|
|
- windows/installer/*.wxs
|
|
|
|
- .github/workflows/ci-windows-build-msi.yml
|
2022-05-17 10:14:59 +00:00
|
|
|
pull_request:
|
2022-11-28 09:52:42 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/**
|
2023-01-13 13:16:17 +00:00
|
|
|
paths:
|
|
|
|
- windows/installer/*.wxs
|
|
|
|
- .github/workflows/ci-windows-build-msi.yml
|
2022-05-17 10:14:59 +00:00
|
|
|
|
2023-01-13 13:16:17 +00:00
|
|
|
jobs:
|
2022-05-17 10:14:59 +00:00
|
|
|
build:
|
2023-02-28 16:25:09 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-17 09:24:37 +00:00
|
|
|
go-version: ["1.20.4"]
|
2023-02-28 16:25:09 +00:00
|
|
|
|
2022-05-17 10:14:59 +00:00
|
|
|
name: Build
|
|
|
|
runs-on: windows-2019
|
2023-02-28 16:25:09 +00:00
|
|
|
|
2022-05-17 10:14:59 +00:00
|
|
|
steps:
|
2023-02-28 16:25:09 +00:00
|
|
|
|
|
|
|
- name: "Set up Go ${{ matrix.go-version }}"
|
2022-10-14 14:12:21 +00:00
|
|
|
uses: actions/setup-go@v3
|
2022-05-17 10:14:59 +00:00
|
|
|
with:
|
2023-02-28 16:25:09 +00:00
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
2022-05-17 10:14:59 +00:00
|
|
|
- name: Check out code into the Go module directory
|
2023-01-13 13:16:17 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-02-28 16:25:09 +00:00
|
|
|
submodules: false
|
|
|
|
|
|
|
|
- name: Cache Go modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/go/pkg/mod
|
|
|
|
~/.cache/go-build
|
|
|
|
~/Library/Caches/go-build
|
|
|
|
%LocalAppData%\go-build
|
|
|
|
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
|
|
|
2022-05-17 10:14:59 +00:00
|
|
|
- name: Build
|
|
|
|
run: make windows_installer
|
|
|
|
- name: Upload MSI
|
2023-02-01 15:55:34 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-05-17 10:14:59 +00:00
|
|
|
with:
|
|
|
|
path: crowdsec*msi
|
|
|
|
name: crowdsec.msi
|