Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
go-cqhttp
Commits
5ec4e333
Commit
5ec4e333
authored
Aug 21, 2020
by
xuthus5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:action
parent
739d486b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
131 deletions
+4
-131
.github/workflows/release.yml
.github/workflows/release.yml
+4
-1
build.sh
build.sh
+0
-130
No files found.
.github/workflows/release.yml
View file @
5ec4e333
...
@@ -17,6 +17,8 @@ jobs:
...
@@ -17,6 +17,8 @@ jobs:
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
name
:
Set RELEASE_VERSION env
run
:
echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
-
uses
:
wangyoucao577/go-release-action@master
-
uses
:
wangyoucao577/go-release-action@master
env
:
env
:
CGO_ENABLED
:
0
CGO_ENABLED
:
0
...
@@ -24,4 +26,5 @@ jobs:
...
@@ -24,4 +26,5 @@ jobs:
github_token
:
${{ secrets.GITHUB_TOKEN }}
github_token
:
${{ secrets.GITHUB_TOKEN }}
goos
:
${{ matrix.goos }}
goos
:
${{ matrix.goos }}
goarch
:
${{ matrix.goarch }}
goarch
:
${{ matrix.goarch }}
ldflags
:
"
-w
-s"
ldflags
:
-w -s -X "github.com/Mrs4s/go-cqhttp/coolq.version=${{ env.RELEASE_VERSION }}"
\ No newline at end of file
build.sh
deleted
100644 → 0
View file @
739d486b
#!/usr/bin/env bash
#
# automatically generated in linux environment
#
# automatically generate version information:
# go build -ldflags "-X path.varname=varvalue" -o filename .
#
# shell use e.g:
# ./build.sh v1.0.0
# /get_version_info => version:v1.0.0
#
# all comb to compile
# $GOOS $GOARCH
# android arm
# darwin 386
# darwin amd64
# darwin arm
# darwin arm64
# dragonfly amd64
# freebsd 386
# freebsd amd64
# freebsd arm
# linux 386
# linux amd64
# linux arm
# linux arm64
# linux ppc64
# linux ppc64le
# linux mips
# linux mipsle
# linux mips64
# linux mips64le
# netbsd 386
# netbsd amd64
# netbsd arm
# openbsd 386
# openbsd amd64
# openbsd arm
# plan9 386
# plan9 amd64
# solaris amd64
# windows 386
# windows amd64
function
build_linux32
()
{
export
GOOS
=
linux
export
GOARCH
=
386
filename
=
go-cqhttp-
"
$1
"
-linux-386
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
"
$filename
"
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
--remove-files
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
build_linux64
()
{
export
GOOS
=
linux
export
GOARCH
=
amd64
filename
=
go-cqhttp-
"
$1
"
-linux-amd64
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
"
$filename
"
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
--remove-files
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
build_win32
()
{
export
GOOS
=
windows
export
GOARCH
=
386
filename
=
go-cqhttp-
"
$1
"
-windows-386
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
"
$filename
"
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
--remove-files
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
build_win64
()
{
export
GOOS
=
windows
export
GOARCH
=
amd64
filename
=
go-cqhttp-
"
$1
"
-windows-amd64
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
"
$filename
"
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
build_darwin32
()
{
export
GOOS
=
darwin
export
GOARCH
=
386
filename
=
go-cqhttp-
"
$1
"
-darwin-386
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
go-cqhttp-
"
$1
"
-darwin-386
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
--remove-files
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
build_darwin64
()
{
export
GOOS
=
darwin
export
GOARCH
=
amd64
filename
=
go-cqhttp-
"
$1
"
-darwin-amd64
go build
-ldflags
"-X github.com/Mrs4s/go-cqhttp/coolq.version=
$1
"
-o
go-cqhttp-
"
$1
"
-darwin-amd64
.
tar
zcvf
"
$filename
"
.tar.gz
"
$filename
"
--remove-files
md5sum
"
$filename
"
.tar.gz
>
"
$filename
"
.tar.gz.md5
mv
"
$filename
"
.tar.gz ./dist
mv
"
$filename
"
.tar.gz.md5 ./dist
}
function
main
()
{
if
[
!
-d
'dist'
]
;
then
mkdir
dist
fi
#build_linux32 $1
build_linux64
$1
#build_win32 $1
#build_win64 $1
#build_darwin32 $1
#build_darwin64 $1
}
if
[
-n
"
$1
"
]
;
then
main
$1
else
echo
"No version info input...exit!"
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment