Skip to content
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
8 changes: 6 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ jobs:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# Build, sign and notarize (requires macOS for Apple signing). Notarization runs only when the
# repository variable APPLE_NOTARIZE is "true".
# Build, sign and notarize (requires macOS for Apple signing).
# Code signing and notarization run only when the repository variable APPLE_NOTARIZE is "true".
# Otherwise darwin/arm64 keeps the ad-hoc signature Go's linker gives it.
build:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
Expand All @@ -112,6 +113,7 @@ jobs:
persist-credentials: false

- name: Import codesign cert
if: vars.APPLE_NOTARIZE == 'true'
uses: apple-actions/import-codesign-certs@63fff01cd422d4b7b855d40ca1e9d34d2de9427d # v3.0.0
with:
p12-file-base64: ${{ secrets.APPLE_CERT_P12_BASE64_ENCODED }}
Expand Down Expand Up @@ -158,11 +160,13 @@ jobs:
done

- name: Code sign darwin binaries
if: vars.APPLE_NOTARIZE == 'true'
run: |
codesign --timestamp --options=runtime -s "Developer ID Application: Nexmo Inc. (7F2B5ZSP8Q)" -v dist/vcr_darwin_amd64
codesign --timestamp --options=runtime -s "Developer ID Application: Nexmo Inc. (7F2B5ZSP8Q)" -v dist/vcr_darwin_arm64

- name: Verify code signing
if: vars.APPLE_NOTARIZE == 'true'
run: |
codesign -vvv --deep --strict dist/vcr_darwin_amd64
codesign -vvv --deep --strict dist/vcr_darwin_arm64
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ jobs:
make_latest: ${{ contains(inputs.tag, '-') && 'false' || 'true' }}

# Build, sign and notarize (requires macOS for Apple signing). Only main reaches this job.
# Notarization runs only when the repository variable APPLE_NOTARIZE is "true".
# Code signing and notarization run only when the repository variable APPLE_NOTARIZE is "true".
# Otherwise darwin/arm64 keeps the ad-hoc signature Go's linker gives it.
build:
if: github.ref == 'refs/heads/main'
needs: draft
Expand All @@ -145,6 +146,7 @@ jobs:
persist-credentials: false

- name: Import codesign cert
if: vars.APPLE_NOTARIZE == 'true'
uses: apple-actions/import-codesign-certs@63fff01cd422d4b7b855d40ca1e9d34d2de9427d # v3.0.0
with:
p12-file-base64: ${{ secrets.APPLE_CERT_P12_BASE64_ENCODED }}
Expand Down Expand Up @@ -191,11 +193,13 @@ jobs:
done

- name: Code sign darwin binaries
if: vars.APPLE_NOTARIZE == 'true'
run: |
codesign --timestamp --options=runtime -s "Developer ID Application: Nexmo Inc. (7F2B5ZSP8Q)" -v dist/vcr_darwin_amd64
codesign --timestamp --options=runtime -s "Developer ID Application: Nexmo Inc. (7F2B5ZSP8Q)" -v dist/vcr_darwin_arm64

- name: Verify code signing
if: vars.APPLE_NOTARIZE == 'true'
run: |
codesign -vvv --deep --strict dist/vcr_darwin_amd64
codesign -vvv --deep --strict dist/vcr_darwin_arm64
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ This project uses [Release Please](https://github.com/googleapis/release-please)
3. **Draft release**: When the Release PR is merged, lint and the tests run, then a draft GitHub Release is created
4. **Build, sign & publish**: The release triggers the build pipeline which:
- Cross-compiles binaries for all platforms
- Code signs macOS binaries, and notarizes them when the repository variable `APPLE_NOTARIZE` is `true`
- Code signs and notarizes macOS binaries when the repository variable `APPLE_NOTARIZE` is `true`
- Signs `checksums.txt` with the release key (see [Verifying a download](#verifying-a-download))
- Uploads the archives, the checksums and the signature to the draft, then publishes it
- Installs the published release and checks that it reports the new version
Expand Down
Loading