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
674c7970
Commit
674c7970
authored
Aug 03, 2020
by
Mrs4s
Committed by
GitHub
Aug 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16 from mnixry/patch-1
优化Release工作流,增加CI工作流
parents
d5bff2ad
94ebee6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
.github/workflows/ci.yml
.github/workflows/ci.yml
+51
-0
.github/workflows/release.yml
.github/workflows/release.yml
+4
-0
No files found.
.github/workflows/ci.yml
0 → 100644
View file @
674c7970
name
:
CI
on
:
[
push
,
pull_request
]
env
:
BINARY_PREFIX
:
"
go-cqhttp_"
BINARY_SUFFIX
:
"
"
PR_PROMPT
:
"
::warning::
Build
artifact
will
not
be
uploaded
due
to
the
workflow
is
trigged
by
pull
request."
LD_FLAGS
:
"
-w
-s"
jobs
:
build
:
name
:
Build binary CI
runs-on
:
ubuntu-latest
strategy
:
matrix
:
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64
goos
:
[
linux
,
windows
,
darwin
]
goarch
:
[
"
386"
,
amd64
,
arm
]
exclude
:
-
goos
:
darwin
goarch
:
arm
fail-fast
:
true
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Setup Go environment
uses
:
actions/setup-go@v2.1.1
with
:
go-version
:
1.14
-
name
:
Build binary file
env
:
GOOS
:
${{ matrix.goos }}
GOARCH
:
${{ matrix.goarch }}
IS_PR
:
${{ !!github.head_ref }}
run
:
|
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi
if $IS_PR ; then echo $PR_PROMPT; fi
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
go build -o "output/$BINARY_NAME" -ldflags "$LD_FLAGS" .
-
name
:
Upload artifact
uses
:
actions/upload-artifact@v2
if
:
${{ !github.head_ref }}
with
:
name
:
${{ matrix.goos }}_${{ matrix.goarch }}
path
:
output/
.github/workflows/release.yml
View file @
674c7970
...
@@ -11,6 +11,10 @@ jobs:
...
@@ -11,6 +11,10 @@ jobs:
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64
goos
:
[
linux
,
windows
,
darwin
]
goos
:
[
linux
,
windows
,
darwin
]
goarch
:
[
"
386"
,
amd64
,
arm
]
goarch
:
[
"
386"
,
amd64
,
arm
]
exclude
:
-
goos
:
darwin
goarch
:
arm
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
uses
:
wangyoucao577/go-release-action@master
-
uses
:
wangyoucao577/go-release-action@master
...
...
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