Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Add notarization of MacOS binary to CI #173

Merged
merged 2 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Gon
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- name: Import Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Build
run: ./ci/steps/build.sh
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 10 additions & 0 deletions ci/gon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"source": ["./coder"],
"bundle_id": "com.coder.cli",
"sign": {
"application_identity": "3C4F31D15F9D57461A8D7D0BD970D23CE1F7C2BE"
},
"zip": {
"output_path": "coder.zip"
}
}
26 changes: 18 additions & 8 deletions ci/steps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@ build() {

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

pushd "$tmpdir"
if [[ "$GOOS" == "windows" ]]; then
artifact="coder-cli-$GOOS-$GOARCH.zip"
mv coder coder.exe
zip "$artifact" coder.exe
else
artifact="coder-cli-$GOOS-$GOARCH.tar.gz"
tar -czf "$artifact" coder
fi
case "$GOOS" in
"windows")
artifact="coder-cli-$GOOS-$GOARCH.zip"
mv coder coder.exe
zip "$artifact" coder.exe
;;
"linux")
artifact="coder-cli-$GOOS-$GOARCH.tar.gz"
tar -czf "$artifact" coder
;;
"darwin")
artifact="coder-cli-$GOOS-$GOARCH.zip"
gon -log-level debug ./gon.json
mv coder.zip $artifact
;;
esac
popd

mkdir -p ../bin
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy