Skip to content

Commit d6b3c6a

Browse files
authored
chore: [REL-4161] use printf to ensure we get the exact value for homebrew key (#554)
The saga continues. Last time I got an [error](https://github.com/launchdarkly/ld-find-code-refs/actions/runs/16777430844/job/47506788949#step:7:633) that is likely related to a malformed homebrew-tap deploy key. Giving `printf`, and no json encoding a shot. Hopefully, this will write the unaltered value of the key to the file and we'll be good to go. <!-- ld-jira-link --> --- Related Jira issue: [REL-4161: Migrate ld-find-code-refs from Releaser to GHA](https://launchdarkly.atlassian.net/browse/REL-4161) <!-- end-ld-jira-link -->
1 parent 0323f0d commit d6b3c6a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
DRY_RUN: ${{ inputs.dryRun || 'false' }}
2828
CHANGELOG_ENTRY: ${{ inputs.changeLog }}
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
HOMEBREW_GH_TOKEN: ${{ toJSON(secrets.LAUNCHDARKLY_HOMEBREW_TAP_DEPLOY_KEY) }}
30+
HOMEBREW_GH_TOKEN: ${{ secrets.LAUNCHDARKLY_HOMEBREW_TAP_DEPLOY_KEY }}
3131
ARTIFACT_DIRECTORY: "/tmp/release-artifacts"
3232
steps:
3333
- uses: actions/checkout@v4

scripts/release/stage-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ stage_artifacts() (
1010
# write homebrew key to temporary file for Goreleaser
1111
if [[ -n "${HOMEBREW_GH_TOKEN:-}" ]]; then
1212
HOMEBREW_KEY_PATH="/tmp/homebrew-tap-deploy-key"
13-
echo "$HOMEBREW_GH_TOKEN" > "$HOMEBREW_KEY_PATH"
13+
printf '%s\n' "$HOMEBREW_GH_TOKEN" > "$HOMEBREW_KEY_PATH"
1414
chmod 600 "$HOMEBREW_KEY_PATH"
1515
export HOMEBREW_KEY_PATH
1616
fi

0 commit comments

Comments
 (0)