From b820d2aef51a12ad435ed4d499abb882c4c45e19 Mon Sep 17 00:00:00 2001 From: Zhicheng Zhang Date: Sun, 14 Apr 2024 17:14:51 +0800 Subject: [PATCH] add pypi publish workflow --- .github/workflows/publish.yaml | 29 +++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..69df22669 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - 'v**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-publish + cancel-in-progress: true + +jobs: + build-n-publish: + runs-on: ubuntu-20.04 + #if: startsWith(github.event.ref, 'refs/tags') + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install wheel + run: pip install wheel + - name: Build ModelScope-Agent + run: python setup.py sdist bdist_wheel + - name: Publish package to PyPI + run: | + pip install twine + twine upload package/dist/* --skip-existing -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 45458336f..148fd5a48 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def get_version(): 'ModelScope Agent: Be a powerful models and tools agent based on ModelScope and open source LLM.', author='Modelscope Team', author_email='contact@modelscope.cn', - keywords='python,agent,LLM,AIGC', + keywords='python,agent,LLM,AIGC,qwen,ModelScope', url= 'https://github.com/modelscope/modelscope-agent', # Replace with your repository URL license='Apache License 2.0',