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

Add Homebrew automation #170

Closed
wants to merge 2 commits into from
Closed
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
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,32 @@ jobs:
run: |
python setup.py sdist bdist_wheel
twine upload dist/*


update-brew:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: publish brew
run: |
echo "Sleeping for 5 minutes to make sure that it is uploaded to PyPi"
sleep 5m
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
pip install homebrew-pypi-poet
pip install parliament -U
git fetch origin
git checkout --track origin/main
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "latest tag: $latest_tag"
git pull origin $latest_tag
mkdir -p HomebrewFormula
poet -f parliament > HomebrewFormula/parliament.rb
git add .
git commit -m "update brew formula" parliament/__init__.py HomebrewFormula/parliament.rb || echo "No brew changes to commit"
git push -u origin main
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ This library duplicates (and adds to!) much of the functionality in the web cons
[demo](https://parliament.summitroute.com/)

# Installation

* Pip

```
pip install parliament
```

* Homebrew

```
brew tap duo-labs/parliament https://github.com/duo-labs/parliament
brew install parliament
```

# Usage
```
cat > test.json << EOF
Expand Down