|
@@ -3,46 +3,47 @@ name: build
|
|
|
|
|
|
on:
|
|
|
release:
|
|
|
- types: prereleased
|
|
|
+ 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 }}
|
|
|
+ - 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 }}
|
|
|
+ - 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 }}
|