2022-06-17 14:12:49 +00:00
|
|
|
name: build-msi (windows)
|
2022-05-17 10:14:59 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2022-11-28 09:52:42 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/**
|
2022-05-17 10:14:59 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'mkdocs.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
|
|
|
jobs:
|
2022-12-21 19:34:11 +00:00
|
|
|
get_latest_release:
|
|
|
|
name: get_latest_release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- id: get_latest_release
|
|
|
|
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
latest: true
|
2022-05-17 10:14:59 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
2022-08-26 11:31:49 +00:00
|
|
|
- name: Set up Go 1.19
|
2022-10-14 14:12:21 +00:00
|
|
|
uses: actions/setup-go@v3
|
2022-05-17 10:14:59 +00:00
|
|
|
with:
|
2022-08-26 11:31:49 +00:00
|
|
|
go-version: 1.19
|
2022-05-17 10:14:59 +00:00
|
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- id: set_release_in_env
|
2022-12-21 19:34:11 +00:00
|
|
|
run: echo "BUILD_VERSION=${{ jobs.get_latest_release.outputs.tag_name }}" >> $env:GITHUB_ENV
|
2022-05-17 10:14:59 +00:00
|
|
|
- name: Build
|
|
|
|
run: make windows_installer
|
|
|
|
- name: Upload MSI
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
path: crowdsec*msi
|
|
|
|
name: crowdsec.msi
|