Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): race-condition in signing macos binaries #433

Merged
merged 3 commits into from
Dec 7, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: v1.12.3
args: release --rm-dist --skip-publish --skip-sign
version: latest
args: release --rm-dist --skip-publish --skip-sign --parallelism=2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
Expand Down
9 changes: 6 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ builds:
goarch:
- amd64
hooks:
post: gon -log-level DEBUG gon.hcl
post:
- cmd: gon -log-level DEBUG gon.hcl
output: true
- id: "hcloud-macos-arm-build"
main: ./cmd/hcloud/main.go
binary: hcloud
Expand All @@ -44,8 +46,9 @@ builds:
goarch:
- arm64
hooks:
post: gon -log-level DEBUG gon_arm64.hcl

post:
- cmd: gon -log-level DEBUG gon_arm64.hcl
output: true
before:
hooks:
- go mod tidy
Expand Down
3 changes: 3 additions & 0 deletions script/decrypt_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
gpg --quiet --batch --yes --decrypt --passphrase="$SECRETS_PASSWORD" --output ./.github/secrets/hcloud_cli.p12 ./.github/secrets/hcloud_cli.p12.gpg

security create-keychain -p "" build.keychain
# Use long timeout for keychain to avoid issues where codesign fails because the keychain is locked
# before it was used. Default timeout is 300s
security set-keychain-settings -u -t 3600 ~/Library/Keychains/build.keychain
security import ./.github/secrets/hcloud_cli.p12 -t agg -k ~/Library/Keychains/build.keychain -P "$CERT_PASSWORD" -A

security list-keychains -s ~/Library/Keychains/build.keychain
Expand Down