diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fca0bdb..b16770c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,16 +5,24 @@ on: types: [created] jobs: - publish: + build-n-publish: + name: Build and publish Python wheel to PyPI runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: "3.x" cache: pip - - name: To PyPI using Flit - uses: AsifArmanRahman/to-pypi-using-flit@v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel flit + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build a binary wheel and a source tarball + run: python -m flit build + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 98789fb..0e14936 100755 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -1,6 +1,6 @@ name: Python package -on: ["push", "pull_request"] +on: ["pull_request"] jobs: build: diff --git a/README.md b/README.md index 3ab2d61..e11e51a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # nem-reader -[![PyPI version](https://badge.fury.io/py/nemreader.svg)](https://badge.fury.io/py/nemreader) ![Python package](https://github.com/aguinane/nem-reader/workflows/Python%20package/badge.svg?branch=master) [![Documentation Status](https://readthedocs.org/projects/nem-reader/badge/?version=latest)](https://nem-reader.readthedocs.io/en/latest/?badge=latest) +![Python package](https://github.com/aguinane/nem-reader/workflows/Python%20package/badge.svg?branch=master) +[![PyPI version](https://img.shields.io/pypi/pyversions/nemreader?color=%2344CC11)](https://pypi.org/project/nemreader/) +[![PyPi downloads](https://img.shields.io/pypi/dw/nemreader?label=downloads@pypi&color=344CC11)](https://pypi.org/project/nemreader/) +[![Documentation Status](https://readthedocs.org/projects/nem-reader/badge/?version=latest)](https://nem-reader.readthedocs.io/en/latest/?badge=latest) The Australian Energy Market Operator (AEMO) defines a [Meter Data File Format (MDFF)](https://www.aemo.com.au/Stakeholder-Consultation/Consultations/Meter-Data-File-Format-Specification-NEM12-and-NEM13) for reading energy billing data. This library sets out to parse these NEM12 (interval metering data) and NEM13 (accumulated metering data) data files into a useful python object, for use in other projects. diff --git a/nemreader/version.py b/nemreader/version.py index af46754..de77196 100644 --- a/nemreader/version.py +++ b/nemreader/version.py @@ -1 +1 @@ -__version__ = "0.8.5" +__version__ = "0.8.6"