-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.48 KB
/
release.yml
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
name: release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.21.x'
- name: Setup Luajit
run: |
uname -a
sudo apt-get update
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null
sudo apt-get update
sudo apt-get -y install openresty
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Golnag
run: |
go version
export CGO_ENABLED=0
go build
- name: Build Luajit
run: |
/usr/local/openresty/luajit/bin/luajit -v
folder="./script"
for file in $folder/*.lua
do
/usr/local/openresty/luajit/bin/luajit -b $file $file
done
- name: Archive Files
run: |
tar -czvf wafcdn.tar.gz wafcdn .env.sample conf script
zip -r wafcdn.zip *
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
wafcdn.tar.gz
wafcdn.zip