x
This commit is contained in:
+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