Skip to content

- fixed crash when processing refunds due #7

- fixed crash when processing refunds due

- fixed crash when processing refunds due #7

Workflow file for this run

name: deploy monzo-utils
on: push
defaults:
run:
shell: bash
jobs:
push_sieve:
name: deploy monzo-utils
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetches all history for all tags and branches
- name: check for new release
run: |
latest_release=`curl -s https://pypi.org/pypi/monzo-utils/json | jq -r '.info.version'`
version=`grep '^##' CHANGELOG.md |head -n1 |cut -d ' ' -f2`
if [ "$latest_release" = "$version" ] ; then
echo "no new version to release, stopping."
echo "::set-output name=should-stop::true"
else
echo "::set-output name=should-stop::false"
fi
- name: build monzo-utils
if: steps.check.outputs.should-stop == 'false'
run: |
mkdir venv
python3 -m venv venv
source venv/bin/activate
pip3 install twine wheel
if [ -e dist ] ; then
rm -f dist/*
fi
python3 setup.py bdist_wheel
- name: deploy to pypi
if: steps.check.outputs.should-stop == 'false'
run: |
source venv/bin/activate
twine upload dist/*.whl
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- name: create github release
if: steps.check.outputs.should-stop == 'false'
run: |
version=`grep '^##' CHANGELOG.md |head -n1 |cut -d ' ' -f2`
change=`awk '/^## /{if (p) exit; p=1} p && /^- /' CHANGELOG.md`
gh release create $version --target master --notes "$change"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}