mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
# This workflows will build and upload a Python Package using Twine when a release is published
|
|
# Conda-forge bot will pick up new PyPI version and automatically create new version
|
|
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
|
|
name: python-package
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
permissions: {}
|
|
# actions: read
|
|
# checks: read
|
|
# contents: read
|
|
# deployments: read
|
|
jobs:
|
|
deploy:
|
|
strategy:
|
|
matrix:
|
|
os: ['ubuntu-latest']
|
|
python-version: [3.10]
|
|
runs-on: ${{ matrix.os }}
|
|
environment:
|
|
name: package
|
|
url: https://pypi.org/p/autogen-agentchat
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
# - name: Cache conda
|
|
# uses: actions/cache@v4
|
|
# with:
|
|
# path: ~/conda_pkgs_dir
|
|
# key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('environment.yml') }}
|
|
# - name: Setup Miniconda
|
|
# uses: conda-incubator/setup-miniconda@v2
|
|
# with:
|
|
# auto-update-conda: true
|
|
# auto-activate-base: false
|
|
# activate-environment: hcrystalball
|
|
# python-version: ${{ matrix.python-version }}
|
|
# use-only-tar-bz2: true
|
|
- name: Install from source
|
|
# This is required for the pre-commit tests
|
|
shell: pwsh
|
|
run: pip install .
|
|
# - name: Conda list
|
|
# shell: pwsh
|
|
# run: conda list
|
|
- name: Build
|
|
shell: pwsh
|
|
run: |
|
|
pip install twine
|
|
python setup.py sdist bdist_wheel
|
|
- name: Publish package to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|