Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commita900f7c

Browse files
committed
Add notarization of MacOS binary to CI
1 parent23d4b95 commita900f7c

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

‎.github/workflows/build.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ jobs:
77
steps:
88
-name:Checkout
99
uses:actions/checkout@v1
10+
-name:Install Gon
11+
run:|
12+
brew tap mitchellh/gon
13+
brew install mitchellh/gon/gon
14+
-name:Import Signing Certificates
15+
uses:Apple-Actions/import-codesign-certs@v1
16+
with:
17+
p12-file-base64:${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
18+
p12-password:${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
1019
-name:Build
1120
run:./ci/steps/build.sh
1221
-name:Upload

‎ci/gon.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"source": ["./coder"],
3+
"bundle_id":"com.coder.cli",
4+
"sign": {
5+
"application_identity":"3C4F31D15F9D57461A8D7D0BD970D23CE1F7C2BE"
6+
},
7+
"zip": {
8+
"output_path":"coder.zip"
9+
}
10+
}

‎ci/steps/build.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,26 @@ build() {
1414

1515
tmpdir=$(mktemp -d)
1616
go build -ldflags"-X cdr.dev/coder-cli/internal/version.Version=${tag}" -o"$tmpdir/coder" ../../cmd/coder
17+
# For MacOS builds to be notarized.
18+
cp ../gon.json$tmpdir/gon.json
1719

1820
pushd"$tmpdir"
19-
if [["$GOOS"=="windows" ]];then
20-
artifact="coder-cli-$GOOS-$GOARCH.zip"
21-
mv coder coder.exe
22-
zip"$artifact" coder.exe
23-
else
24-
artifact="coder-cli-$GOOS-$GOARCH.tar.gz"
25-
tar -czf"$artifact" coder
26-
fi
21+
case"$GOOS"in
22+
"windows")
23+
artifact="coder-cli-$GOOS-$GOARCH.zip"
24+
mv coder coder.exe
25+
zip"$artifact" coder.exe
26+
;;
27+
"linux")
28+
artifact="coder-cli-$GOOS-$GOARCH.tar.gz"
29+
tar -czf"$artifact" coder
30+
;;
31+
"darwin")
32+
artifact="coder-cli-$GOOS-$GOARCH.zip"
33+
gon -log-level debug ./gon.json
34+
mv coder.zip$artifact
35+
;;
36+
esac
2737
popd
2838

2939
mkdir -p ../bin

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp