Skip to content

Commit 70474a1

Browse files
committed
fix formula and give github app repo control
1 parent 69c5351 commit 70474a1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/publish-homebrew.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
app-id: ${{ secrets.HOTDATA_AUTOMATION_APP_ID }}
2222
private-key: ${{ secrets.HOTDATA_AUTOMATION_PRIVATE_KEY }}
2323
owner: hotdata-dev
24-
repositories: homebrew-tap
24+
repositories: homebrew-tap,hotdata-cli
2525

2626
- uses: actions/checkout@v6
2727
with:
@@ -50,9 +50,9 @@ jobs:
5050
brew update
5151
brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true
5252
53-
# Add shell completions generation if not already present
53+
# Add shell completions generation before the closing "end" of the install method
5454
if ! grep -q 'generate_completions_from_executable' "Formula/${filename}"; then
55-
sed -i '/bin\.install "hotdata"/a\ generate_completions_from_executable(bin/"hotdata", "completions")' "Formula/${filename}"
55+
sed -i '/^ end$/i\ generate_completions_from_executable(bin/"hotdata", "completions")' "Formula/${filename}"
5656
fi
5757
5858
git add "Formula/${filename}"
@@ -62,7 +62,7 @@ jobs:
6262
6363
- name: Remove .rb from GitHub Release assets
6464
env:
65-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
6666
run: |
6767
TAG=$(echo "$PLAN" | jq -r '.announcement_tag')
6868
if [ -z "$TAG" ] || [ "$TAG" = "null" ]; then

0 commit comments

Comments
 (0)