Skip to content

Commit

Permalink
Merge pull request #4 from secondmind-labs/va/pypi
Browse files Browse the repository at this point in the history
deploy pypi
  • Loading branch information
thevincentadam authored Sep 15, 2021
2 parents 2f24720 + b94e0a1 commit ea90d8b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 3 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/upload-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2021 The banded_matrices Contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Upload-PyPI



on:
workflow_dispatch:
push:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
tags: v[0-9]+.[0-9]+.[0-9]+*

jobs:
check-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
tensorflow: [2.2.1]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
# ------------ build and install package
- name: Install package
run: poetry install
# ------------ run tests
- name: Run tests
run: poetry run task test
pypi:
# needs: check-and-test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
poetry-version: [1.1.6]
name: Release PyPi package
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
# ------------ build and install package
- name: Install package
run: |
poetry install
poetry build
# ------------ publish to pypi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "markovflow"
version = "0.33.0"
version = "0.0.1"
description = "A Tensorflow based library for Time Series Modelling with Gaussian Processes"
authors = ["Markovflow Contributors <[email protected]>"]
packages = [{include = "markovflow"}]
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
'tensorflow-probability==0.11.0',
'tensorflow==2.2.1']

with open("VERSION") as file:
version = file.read().strip()

with open("README.md") as file:
long_description = file.read()

setup_kwargs = {
'name': 'markovflow',
'version': '0.33.0',
"version": version,
"long_description": long_description,
'description': 'A Tensorflow based library for Time Series Modelling with Gaussian Processes',
'long_description': None,
'author': 'Markovflow Team',
'author_email': '[email protected]',
'maintainer': None,
Expand Down

0 comments on commit ea90d8b

Please sign in to comment.