Skip to content

Commit b320b59

Browse files
author
lijiuyang.5137
committed
Keep Homebrew formula in tap only
1 parent 08d4482 commit b320b59

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
merge-multiple: true
8181

8282
- name: Generate Homebrew formula
83+
if: ${{ env.HOMEBREW_TAP_TOKEN != '' }}
8384
run: |
8485
bash scripts/generate-homebrew-formula.sh "${GITHUB_REPOSITORY}" "${GITHUB_REF_NAME}" dist > dist/cctty.rb
8586
@@ -91,13 +92,11 @@ jobs:
9192
gh release upload "${GITHUB_REF_NAME}" \
9293
dist/*.tar.gz \
9394
dist/*.sha256 \
94-
dist/cctty.rb \
9595
--clobber
9696
else
9797
gh release create "${GITHUB_REF_NAME}" \
9898
dist/*.tar.gz \
9999
dist/*.sha256 \
100-
dist/cctty.rb \
101100
--title "cctty ${GITHUB_REF_NAME}" \
102101
--generate-notes
103102
fi

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ brew install cctty
6565
```
6666

6767
The tap lives at
68-
[`Pyiner/homebrew-cctty`](https://github.com/Pyiner/homebrew-cctty). Each
69-
tagged release also attaches the generated formula as `cctty.rb` for auditing
70-
and manual tap updates.
68+
[`Pyiner/homebrew-cctty`](https://github.com/Pyiner/homebrew-cctty).
7169

7270
### Release Binary
7371

@@ -334,11 +332,11 @@ git tag v0.1.0
334332
git push origin v0.1.0
335333
```
336334

337-
The release workflow builds macOS and Linux archives, publishes SHA-256 sums,
338-
and attaches a generated Homebrew formula as `cctty.rb`. If the repository
339-
secret `HOMEBREW_TAP_TOKEN` is configured with write access to
340-
`Pyiner/homebrew-cctty`, the same workflow also updates
341-
`Formula/cctty.rb` in the tap.
335+
The release workflow builds macOS and Linux archives and publishes SHA-256
336+
sums. If the repository secret `HOMEBREW_TAP_TOKEN` is configured with write
337+
access to `Pyiner/homebrew-cctty`, the same workflow also updates
338+
`Formula/cctty.rb` in the tap. The formula is not published as a release asset;
339+
users should install through the tap.
342340

343341
## Compatibility Matrix
344342

0 commit comments

Comments
 (0)