x
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ func Init() {
|
||||
if err != nil {
|
||||
os.MkdirAll(DataHome, os.ModePerm)
|
||||
}
|
||||
utils.ReadYaml(utils.ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyplus/main/conf/demo_config.yaml")
|
||||
// utils.ReadYaml(utils.ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyplus/main/conf/demo_config.yaml")
|
||||
initToHandleMessage()
|
||||
|
||||
sillyGirl.Set("started_at", time.Now().Format("2006-01-02 15:04:05"))
|
||||
|
||||
@@ -22,6 +22,7 @@ require (
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/stretchr/testify v1.8.0
|
||||
golang.org/x/net v0.4.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
@@ -30,7 +31,6 @@ require (
|
||||
github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
golang.org/x/net v0.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
|
||||
+13
-14
@@ -16,36 +16,35 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
go-version: 1.18
|
||||
|
||||
- name: Git clone sillyplus
|
||||
run:
|
||||
cd develop && git clone https://${{ secrets.CABLE_TOKEN }}@github.com/cdle/sillyplus.git
|
||||
|
||||
- name: Push to binary
|
||||
run: |
|
||||
rm -rf *
|
||||
cp sillyplus/* ./
|
||||
git clone https://${{ secrets.CABLE_TOKEN }}@github.com/cdle/sillyplus.git
|
||||
cp -r sillyplus/* ./
|
||||
- name: Push to binary
|
||||
run: |
|
||||
n=$(date +%s%3N)
|
||||
echo "package core" > sillyplus/core/compile_time.go
|
||||
echo "var compiled_at = \"$n\"" >> develop/core/compile_time.go
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o sillyGirl_windows_amd64
|
||||
echo "package core" > core/compile_time.go
|
||||
echo "var compiled_at = \"$n\"" >> core/compile_time.go
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o sillyGirl_windows_amd64.exe
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o sillyGirl_linux_arm64
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o sillyGirl_linux_amd64
|
||||
sudo apt-get install upx-ucl
|
||||
upx sillyGirl_linux_arm64
|
||||
upx sillyGirl_linux_amd64
|
||||
upx sillyGirl_windows_amd64
|
||||
upx sillyGirl_windows_amd64.exe
|
||||
git clone https://${{ secrets.CABLE_TOKEN }}@github.com/cdle/binary.git
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
cd binary
|
||||
git checkout --orphan latest_branch
|
||||
rm -rf *
|
||||
cp ../sillyGirl_windows_amd64 sillyGirl_windows_amd64_$n
|
||||
cp ../sillyGirl_windows_amd64.exe sillyGirl_windows_amd64_$n.exe
|
||||
cp ../sillyGirl_linux_amd64 sillyGirl_linux_amd64_$n
|
||||
cp ../sillyGirl_linux_arm64 sillyGirl_linux_arm64_$n
|
||||
cp ../develop/core/compile_time.go compile_time.go
|
||||
cp ../core/compile_time.go compile_time.go
|
||||
git add -A
|
||||
git commit -am "commit message"
|
||||
git branch -D main
|
||||
@@ -66,8 +65,8 @@ jobs:
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: sillyGirl_windows_amd64
|
||||
asset_name: sillyGirl_windows_amd64
|
||||
file: sillyGirl_windows_amd64.exe
|
||||
asset_name: sillyGirl_windows_amd64.exe
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user