Skip to content

Commit

Permalink
Merge pull request #28 from ProdPerfect/lb/automate-pypi-publishing
Browse files Browse the repository at this point in the history
automate publishing to pypi
  • Loading branch information
rhymiz authored May 19, 2021
2 parents e2739df + e50c6e1 commit b6b750c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
26 changes: 26 additions & 0 deletions .github/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Package
on:
release:
types: [ created ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
6 changes: 3 additions & 3 deletions monday/query_joins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json

from monday.utils import monday_json_stringify


Expand Down Expand Up @@ -121,8 +122,7 @@ def update_item_query(board_id, item_id, column_id, value):


def update_multiple_column_values_query(board_id, item_id, column_values):

query = '''mutation
query = '''mutation
{
change_multiple_column_values (
board_id: %s,
Expand All @@ -138,7 +138,7 @@ def update_multiple_column_values_query(board_id, item_id, column_values):
}
}''' % (board_id, item_id, monday_json_stringify(column_values))

return query
return query


def add_file_to_column_query(item_id, column_id):
Expand Down
3 changes: 1 addition & 2 deletions monday/resources/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
from monday import __version__
from monday.exceptions import MondayError

from monday.graphqlclient.client import GraphQLClient

_URLS = {
Expand Down
1 change: 1 addition & 0 deletions monday/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json


def monday_json_stringify(value):
# This is necessary because Monday's API says that it requires a JSON encoded string for JSON values,
# ala JSON.stringify, which doesn't quite work the same as json.dumps, unfortunately.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Operating System :: OS Independent",
])

0 comments on commit b6b750c

Please sign in to comment.