crowdsec/.github/workflows/publish-tarball-release.yml

45 lines
1 KiB
YAML
Raw Normal View History

2020-05-15 09:41:18 +00:00
# .github/workflows/build-docker-image.yml
name: build
2020-05-15 09:41:18 +00:00
on:
2020-05-15 09:41:18 +00:00
release:
types:
- prereleased
2020-05-15 09:41:18 +00:00
permissions:
# Use write for: hub release edit
contents: write
2020-05-15 09:41:18 +00:00
jobs:
build:
2023-02-28 16:25:09 +00:00
strategy:
matrix:
2024-01-11 08:40:51 +00:00
go-version: ["1.21.6"]
2023-02-28 16:25:09 +00:00
2020-05-15 09:41:18 +00:00
name: Build and upload binary package
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
2023-02-28 16:25:09 +00:00
submodules: false
- name: "Set up Go ${{ matrix.go-version }}"
uses: actions/setup-go@v4
2023-02-28 16:25:09 +00:00
with:
go-version: ${{ matrix.go-version }}
2023-02-28 16:25:09 +00:00
- name: Build the binaries
run: |
sudo apt -qq -y -o=Dpkg::Use-Pty=0 install build-essential libre2-dev
make vendor release BUILD_STATIC=1
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag_name="${GITHUB_REF##*/}"
gh release upload "$tag_name" crowdsec-release.tgz vendor.tgz *-vendor.tar.xz