Skip to content

Add deployment to marqo whening push to 2.x #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 45 additions & 11 deletions .github/workflows/publish-to-PyPI.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,83 @@
# GitHub Actions Workflow: Publish to PyPI
# This workflow automates the process of testing and publishing Py-Marqo to PyPI.
# This workflow:
# 1. Runs unit tests using the open-source-unit-tests.yml workflow
# 2. Publishes the package to PyPi given the unit tests passed
# This workflow automates the process of testing and publishing Py-Marqo to PyPI.
# This workflow:
# 1. Runs unit tests using the open-source-unit-tests.yml workflow
# 2. Publishes the package to pypi package marqo
# 3. Publishes the package to pypi package marqo1

name: Publish to PyPI


on:
push:
branches:
- 2.x


permissions:
contents: read


jobs:
Run-open-source-unit-tests:
name: Run open source unit tests
uses: ./.github/workflows/open-source-unit-tests.yml
secrets: inherit
Publish-to-PyPi:

Publish-to-PyPi-marqo1:
runs-on: ubuntu-latest
environment: PyPI
needs:
- Run-open-source-unit-tests
env:
MARQO_PACKAGE_NAME: marqo1

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build
- name: Publish package

- name: Publish marqo1 package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

Publish-to-Pypi-marqo:
runs-on: ubuntu-latest
environment: PyPI
env:
MARQO_PACKAGE_NAME: marqo

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build

- name: Publish marqo package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[metadata]
name = marqo1
version = attr: marqo1.__version__
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
from setuptools import setup, find_packages
import os
# from src.marqo.version import __version__

with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()


def get_package_name() -> str:
return os.getenv("MARQO_PACKAGE_NAME", "marqo1")


setup(
install_requires=[
# client:
Expand All @@ -18,6 +24,7 @@
"tox"
],
author="marqo org",
name=get_package_name(),
author_email="[email protected]",
description="Tensor search for humans",
long_description=long_description,
Expand Down