Add media download headers in py-marqo and upgrade version to 3.9.0 (… #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
name: Publish to PyPI | |
on: | |
push: | |
branches: | |
- mainline | |
- 'releases/*' | |
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: | |
runs-on: ubuntu-latest | |
environment: PyPI | |
needs: | |
- Run-open-source-unit-tests | |
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 | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |