From 18a2993969e3c40a37de115bc28f0f7bbd1fcdaa Mon Sep 17 00:00:00 2001 From: Patrick Demers Date: Wed, 1 May 2024 19:46:02 -0700 Subject: [PATCH] attach assets to release --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..30807e2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Attach Assets to Release + +on: + release: + types: [created] + +permissions: + contents: write + packages: write + +env: + CGO_ENABLED: 1 + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, darwin] + goarch: [amd64, arm64] + steps: + - uses: actions/checkout@v4 + - name: Set up protoc + run: | + wget https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip + unzip protoc-25.1-linux-x86_64.zip + sudo mv bin/protoc /usr/local/bin/protoc + sudo mv include/* /usr/local/include/ + - name: install pkg-config + run: sudo apt-get install pkg-config + - name: install librdkafka + run: sudo apt-get install librdkafka + - name: Install protoc-gen-go + run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "https://dl.google.com/go/go1.20.3.linux-amd64.tar.gz" + project_path: "./cmd" + binary_name: "fleet-telemetry"