fix the luajit to openresty luajit #14
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: 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 |