Skip to content

Commit 4ba17d0

Browse files
authored
chore: [REL-4161] pass homebrew token through Makefile to Goreleaser (#551)
Okay, I think I finally understand why Goreleaser wasn't able to find the HOMEBREW_GH_TOKEN. Setting it as an env var on the GHA is not enough, it needs to be explicitly passed to the Makefile, and then passed to the Goreleaser command. <!-- 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 f430c64 commit 4ba17d0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
if [[ "$DRY_RUN" = true ]]; then
6161
./scripts/release/publish-dry-run.sh
6262
else
63-
echo ./scripts/release/publish.sh
63+
./scripts/release/publish.sh
6464
fi
6565
env:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ clean:
7272
rm -f build/package/github-actions/ld-find-code-refs-github-action
7373
rm -f build/package/bitbucket-pipelines/ld-find-code-refs-bitbucket-pipeline
7474

75-
RELEASE_CMD=curl -sL https://git.io/goreleaser | GOPATH=$(mktemp -d) VERSION=$(GORELEASER_VERSION) GITHUB_TOKEN=$(GITHUB_TOKEN) bash -s -- --clean --debug --release-notes $(RELEASE_NOTES)
75+
RELEASE_CMD=curl -sL https://git.io/goreleaser | GOPATH=$(mktemp -d) VERSION=$(GORELEASER_VERSION) GITHUB_TOKEN=$(GITHUB_TOKEN) HOMEBREW_GH_TOKEN=$(HOMEBREW_GH_TOKEN) bash -s -- --clean --debug --release-notes $(RELEASE_NOTES)
7676

7777
publish:
7878
$(RELEASE_CMD)

scripts/release/stage-artifacts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ stage_artifacts() (
77

88
echo "$DOCKER_TOKEN" | sudo docker login --username "$DOCKER_USERNAME" --password-stdin
99

10-
sudo PATH="$PATH" GITHUB_TOKEN="$GITHUB_TOKEN" make "$target"
10+
sudo PATH="$PATH" GITHUB_TOKEN="$GITHUB_TOKEN" HOMEBREW_GH_TOKEN="$HOMEBREW_GH_TOKEN" make "$target"
1111

1212
mkdir -p "$ARTIFACT_DIRECTORY"
1313
cp ./dist/*.deb ./dist/*.rpm ./dist/*.tar.gz ./dist/*.txt "$ARTIFACT_DIRECTORY"

0 commit comments

Comments
 (0)