-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 1.86 KB
/
release.yml
File metadata and controls
77 lines (67 loc) · 1.86 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release Build
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# -------------------------
# Checkout
# -------------------------
- name: Checkout repository
uses: actions/checkout@v4
# -------------------------
# Setup Node
# -------------------------
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 25
cache: "npm"
cache-dependency-path: frontend/package-lock.json
# -------------------------
# Setup Go
# -------------------------
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23
# -------------------------
# Cache Go modules
# -------------------------
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# -------------------------
# Install ncap
# -------------------------
- name: Install libpcap
run: sudo apt-get update && sudo apt-get install -y libpcap-dev
# -------------------------
# Build project
# -------------------------
- name: Build using Makefile
run: make build
# -------------------------
# Create zip artifact
# -------------------------
- name: Package release
run: |
VERSION=${GITHUB_REF_NAME}
zip -r release-${VERSION}.zip release
# -------------------------
# Create GitHub Release
# -------------------------
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
name: Hypervisor ${{ github.ref_name }}
files: Hypervisor-*.zip