Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,33 +78,33 @@
env:
CERT_P12_BASE64: ${{ secrets.APPLE_CERTIFICATE_P12_BASE64 }}
CERT_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
run: |
set -euo pipefail
# Fail rather than fall back to an ad-hoc signature. Every trigger for
# this workflow publishes its output to a GitHub Release and the
# Homebrew tap, and Gatekeeper rejects an ad-hoc signed app on every
# machine except the one that built it.
if [ -z "${CERT_P12_BASE64:-}" ]; then
echo "APPLE_CERTIFICATE_P12_BASE64 is not set; refusing to publish an unsigned build." >&2
exit 1
fi
KEYCHAIN="$RUNNER_TEMP/signing.keychain-db"
KEYCHAIN_PASSWORD="$(uuidgen)"
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security set-keychain-settings -lut 900 "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
printf '%s' "$CERT_P12_BASE64" | base64 --decode > "$RUNNER_TEMP/cert.p12"
security import "$RUNNER_TEMP/cert.p12" -k "$KEYCHAIN" -P "$CERT_PASSWORD" \
-T /usr/bin/codesign -T /usr/bin/security
# Allow codesign to use the key without an interactive prompt.
security set-key-partition-list -S apple-tool:,apple:,codesign: \
-s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN" > /dev/null
# Keep the login keychain in the search list so system roots resolve.
security list-keychains -d user -s "$KEYCHAIN" \
$(security list-keychains -d user | tr -d '"')
rm -f "$RUNNER_TEMP/cert.p12"

- name: Configure signing identity

Check warning on line 107 in .github/workflows/release.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

"PASSWORD" detected here, make sure this is not a hard-coded credential.

See more on https://sonarcloud.io/project/issues?id=pleaseai_openhwp&issues=AaE9zehuVp2bpIxjGC4i&open=AaE9zehuVp2bpIxjGC4i&pullRequest=28
env:
IDENTITY: ${{ vars.APPLE_SIGNING_IDENTITY }}
run: |
Expand Down Expand Up @@ -371,7 +371,7 @@
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: assets
merge-multiple: true
Expand Down
Loading