From b5999df2f535d53428c5211254444b4a9ccb6a5b Mon Sep 17 00:00:00 2001 From: Kinnaird McQuade Date: Mon, 25 Jan 2021 17:24:40 -0500 Subject: [PATCH 1/2] Add Homebrew automation --- .github/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3de2da3..99f78a9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 "action@github.com" + 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 From 51703d58067108973c5d538988a4d3b6be1d1a8f Mon Sep 17 00:00:00 2001 From: Kinnaird McQuade Date: Mon, 25 Jan 2021 17:27:56 -0500 Subject: [PATCH 2/2] Add homebrew installation instructions --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4ec9628..5438240 100644 --- a/README.md +++ b/README.md @@ -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