49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# .github/workflows/build-docker-image.yml
|
|
name: build
|
|
|
|
on:
|
|
release:
|
|
types: prereleased
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and upload binary package
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.19
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
id: go
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
- name: Build the binaries
|
|
run: make release
|
|
- name: Upload to release
|
|
uses: JasonEtco/upload-to-release@master
|
|
with:
|
|
args: crowdsec-release.tgz application/x-gzip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
build_static:
|
|
name: Build and upload binary package
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.19
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
id: go
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
- name: Build the binaries
|
|
run: |
|
|
make release BUILD_STATIC=yes
|
|
mv crowdsec-release.tgz crowdsec-release-static.tgz
|
|
- name: Upload to release
|
|
uses: JasonEtco/upload-to-release@master
|
|
with:
|
|
args: crowdsec-release-static.tgz application/x-gzip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|