Remove unused config (#1462) #75
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
name: build and upload wheels | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
detect-version-changes: | |
uses: ./.github/workflows/check_version.yml | |
with: | |
file_path: pyproject.toml | |
build-wheels: | |
needs: detect-version-changes | |
# Run on main if version has changed | |
if: needs.detect-version-changes.outputs.version_changed == 'true' | |
name: build wheel | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{github.token}} | |
- name: set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
token: ${{github.token}} | |
- name: set up pip | |
run: python -m pip install --upgrade pip | |
- name: build agent0 | |
shell: bash | |
run: source scripts/build_wheels.sh | |
- name: upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux | |
path: ./wheelhouse/*.whl | |
build-sdist: | |
needs: detect-version-changes | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
# Run on main if version has changed | |
if: needs.detect-version-changes.outputs.version_changed == 'true' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-sdist | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build-wheels, build-sdist, detect-version-changes] | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
# Run on main if version has changed | |
if: needs.detect-version-changes.outputs.version_changed == 'true' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all wheels into dist/ | |
pattern: wheels-* | |
path: dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 |