Move benchmarks from GH Actions to ADO; remove cb job from GH workflow #1818
This file contains hidden or 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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: CI/CD | |
| on: | |
| push: | |
| jobs: | |
| cd: | |
| # Note: github.event.pull_request.draft == false WON'T WORK in "if" statement, | |
| # because the triggered event is a push, not a pull_request. | |
| # This means each commit will trigger a release on TestPyPI. | |
| # Those releases will only succeed when each push has a new version number: a1, a2, a3, etc. | |
| if: | | |
| github.event_name == 'push' && | |
| ( | |
| startsWith(github.ref, 'refs/tags') || | |
| startsWith(github.ref, 'refs/heads/release-') | |
| ) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| cache: 'pip' | |
| - name: Build a package for release | |
| run: | | |
| python -m pip install build --user | |
| python -m build --sdist --wheel --outdir dist/ . | |
| - name: | | |
| Publish to TestPyPI when pushing to release-* branch. | |
| You better test with a1, a2, b1, b2 releases first. | |
| uses: pypa/gh-action-pypi-publish@v1.13.0 | |
| if: startsWith(github.ref, 'refs/heads/release-') | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| repository_url: https://test.pypi.org/legacy/ | |
| - name: Publish to PyPI when tagged | |
| if: startsWith(github.ref, 'refs/tags') | |
| uses: pypa/gh-action-pypi-publish@v1.13.0 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |