File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,10 +144,14 @@ jobs:
144144 IN_APPLE_API_ISSUER : ${{ secrets.APPLE_API_ISSUER }}
145145 IN_APPLE_API_KEY_P8 : ${{ secrets.APPLE_API_KEY_P8 }}
146146 run : |
147+ # A fixed heredoc marker lets a credential that happens to contain that
148+ # line close its own value early and turn the rest into environment
149+ # entries. Draw the delimiter at random so no secret can carry it.
150+ delimiter="EOF_$(openssl rand -hex 16)"
147151 for name in CSC_LINK CSC_KEY_PASSWORD CSC_NAME APPLE_ID APPLE_APP_SPECIFIC_PASSWORD APPLE_TEAM_ID APPLE_API_KEY_ID APPLE_API_ISSUER; do
148152 input="IN_${name}"
149153 value="${!input:-}"
150- if [ -n "$value" ]; then printf '%s<<__EOF__ \n%s\n__EOF__ \n' "$name" "$value" >> "$GITHUB_ENV"; fi
154+ if [ -n "$value" ]; then printf '%s<<% s \n%s\n%s \n' "$name" "$delimiter" "$ value" "$delimiter " >> "$GITHUB_ENV"; fi
151155 done
152156 # The App Store Connect key is held as base64 because it is a file, not a
153157 # string. notarytool and electron-builder both want a path, so materialize
You can’t perform that action at this time.
0 commit comments