Skip to content

Commit

Permalink
Fix publish workflow for brew
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimbali committed Nov 16, 2021
1 parent b4ab4f6 commit 383ad94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
run: |
ref=${{ github.ref }}
[ "${ref::10}" = 'refs/tags/' ] && tag=${ref:10} || tag=${{ github.event.inputs.tag }}
if echo ${tag#v} | grep -qxE '[0-9]+(\.[0-9]+)*' ; then final=true; else final=false; fi
echo ::set-output name=tag::$tag
echo ::set-output name=final::$final
if echo ${tag#v} | grep -qxE '[0-9]+(\.[0-9]+)*' ; then release=final; else release=prerelease; fi
echo ::set-output name=tag::${tag#v}
echo ::set-output name=release::$release
- name: Install dependencies
run: |
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
PASSWORD: ${{ secrets.GITHUB_HOMEBREW_TOKEN }}

- name: Make a brew PR from pypi’s metadata
if: ${{ steps.name.outputs.final }}
if: ${{ steps.name.outputs.release == 'final' }}
run: |
jq_script=`printf '.releases."%s"[]? | select(.python_version == "source") | @text "--url=\(.url) --sha256=\(.digests.sha256)"' ${{ steps.name.outputs.tag }}`
brew bump-formula-pr --strict --no-browse `curl -s https://pypi.org/pypi/pympress/json | jq -r "$jq_script"` pympress
Expand Down

0 comments on commit 383ad94

Please sign in to comment.