Build and Release #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |