[Fix] 🐛 webFile Upgrade error #5
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 Go-Proxy-BingAI | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17.0 | |
- name: Build Frontend | |
run: | | |
rm -r web/* && git checkout web/web.go | |
cd frontend | |
npm install | |
npm run build | |
cd .. | |
- name: Push latest webFile | |
run: | | |
git add web/* && git commit -m "[Upgrade] 🚀 Upload latest webFile" --author "Harry-zklcdc" | |
- name: Build binary | |
run: | | |
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go && tar -zcvf go-proxy-bingai-linux-amd64.tar.gz go-proxy-bingai | |
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go && tar -zcvf go-proxy-bingai-linux-arm64.tar.gz go-proxy-bingai | |
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai.exe main.go && tar -zcvf go-proxy-bingai-windows-amd64.tar.gz go-proxy-bingai.exe | |
GOOS=windows GOARCH=arm64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai.exe main.go && tar -zcvf go-proxy-bingai-windows-arm64.tar.gz go-proxy-bingai.exe | |
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go && tar -zcvf go-proxy-bingai-darwin-amd64.tar.gz go-proxy-bingai | |
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -tags netgo -trimpath -o go-proxy-bingai main.go && tar -zcvf go-proxy-bingai-darwin-arm64.tar.gz go-proxy-bingai | |
- name: Create Release and Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
go-proxy-bingai-linux-amd64.tar.gz | |
go-proxy-bingai-linux-arm64.tar.gz | |
go-proxy-bingai-windows-amd64.tar.gz | |
go-proxy-bingai-windows-arm64.tar.gz | |
go-proxy-bingai-darwin-amd64.tar.gz | |
go-proxy-bingai-darwin-arm64.tar.gz | |