Skip to content

lpandarb: handle matured positions (#1536) #138

lpandarb: handle matured positions (#1536)

lpandarb: handle matured positions (#1536) #138

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-linux:
needs: detect-version-changes
# Run on main if version has changed
if: needs.detect-version-changes.outputs.version_changed == 'true'
name: build linux 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: dist/*.whl
- name: Upload the package versions as an artifact
uses: actions/upload-artifact@v4
with:
name: frozen-dependencies
path: dist/frozen-requirements.txt
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-linux, build-sdist, detect-version-changes]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: write
# Run on main if version has changed
if: needs.detect-version-changes.outputs.version_changed == 'true'
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- name: Download dependency list artifact
uses: actions/download-artifact@v4
with:
pattern: frozen-requirements.txt
path: dist
- name: Upload dependency list to release
shell: bash
run: |
gh release upload ${{github.event.release.tag_name}} ./frozen-requirements.txt
- name: Upload to pypi
uses: pypa/gh-action-pypi-publish@release/v1