Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop updating the brew tap #844

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,3 @@ jobs:
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

update-brew-formula:
name: update-brew-formula
runs-on: macos-latest
needs:
- release
steps:
- uses: actions/[email protected]
with:
ref: main
repository: fsouza/homebrew-prettierd
token: ${{ secrets.GH_TOKEN_BREW_TAP }}

- run: brew install sd

- name: set git config
run: |
git config user.name fsouzabot
git config user.email '[email protected]'

- name: update formula file
id: update-formula-file
run: |
tarball_url=$(npm view @fsouza/prettierd dist.tarball)
checksum=$(curl -sL "${tarball_url}" | shasum -a 256 - | awk '{print $1}')
sd 'url ".+"' 'url "'${tarball_url}'"' Formula/prettierd.rb
sd 'sha256 ".+"' 'sha256 "'${checksum}'"' Formula/prettierd.rb
version=$(echo "${tarball_url}" | sd '^.+/-/prettierd-(.+)\.tgz$' '$1')
echo "version=${version}" >> "${GITHUB_OUTPUT}"

- name: test formula
run: |
brew install --formulae --include-test ./Formula/prettierd.rb
brew test ./Formula/prettierd.rb

- name: commit and push
run: |
git commit -m "prettierd v${VERSION}" Formula/prettierd.rb
git push origin main
env:
VERSION: ${{ steps.update-formula-file.outputs.version }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ npm install -g @fsouza/prettierd
Alternatively, users may also use homebrew:

```
$ brew install fsouza/prettierd/prettierd
$ brew install prettierd
```

## Using in the command line with node.js
Expand Down
Loading