# This workflow will install Python dependencies and run all tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: publish

on:
  push:
    branches: [ "main", "develop" ]

jobs:
  publish:

    # Only publish to PyPI if commit is tagged (indicating a new release)
    if: startsWith(github.ref, 'refs/tags')
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        submodules: recursive
    - name: Set up Python 3
      uses: actions/setup-python@v3
      with:
        python-version: "3.10"

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install -r requirements.txt

    - name: Install pypa/build
      run: |
        python -m pip install build --user

    - name: Build a binary wheel and a source tarball
      run: |
        python -m build --sdist --wheel --outdir dist/ .

    - name: Publish distribution to Test PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        password: ${{ secrets.TEST_PYPI_API_TOKEN }}
        repository_url: https://test.pypi.org/legacy/

# This workflow will build the Python project and publish the current tagged
# release to PyPI; it will only run if the triggering commit has been tagged
# For more information see:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: publish

on:
  push:
    branches: [ "main", "develop" ]

jobs:
  publish:

    # Only publish to PyPI if commit is tagged (indicating a new release)
    if: startsWith(github.ref, 'refs/tags')
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        submodules: recursive
    - name: Set up Python 3
      uses: actions/setup-python@v3
      with:
        python-version: "3.10"

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install -r requirements.txt

    - name: Install pypa/build
      run: |
        python -m pip install build --user

    - name: Build a binary wheel and a source tarball
      run: |
        python -m build --sdist --wheel --outdir dist/ .

    - name: Publish distribution to Test PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        password: ${{ secrets.TEST_PYPI_API_TOKEN }}
        repository_url: https://test.pypi.org/legacy/

Update Publish action comment to not be outdated
Update Publish action comment to not be outdated
