-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (46 loc) · 1.51 KB
/
build-and-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # ratchet:actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # ratchet:actions/setup-go@v2
with:
go-version: '1.21.7'
- name: Install BCC Dependencies
run: |
sudo apt update
sudo apt install -y libbpf-dev # Install libbpf dependency
sudo apt install -y libseccomp-dev # Install Seccomp dependencies
- name: Build and Test
run: |
make build-gh
- name: Upload Artifact
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # ratchet:actions/upload-artifact@v2
with:
name: harpoon
path: bin/harpoon
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281 # ratchet:actions/download-artifact@v2
with:
name: harpoon
path: ./
- name: Create Release
id: create_release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # ratchet:softprops/action-gh-release@v1
with:
files: |
harpoon
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}