update the action #15
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@v4 | |
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: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'penndev/veadmin' | |
path: './veadmin' | |
- name: Build dist | |
run: | | |
cd ./veadmin | |
npm install | |
npm run build-wafcdn | |
mv ./dist ../dist | |
cd ../ | |
- name: Archive Files | |
run: | | |
tar -czvf wafcdn.tar.gz conf script wafcdn dist .env.sample wafcdn.service | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
wafcdn.tar.gz |