Upload ms-swift/.github/workflows/publish.yaml with huggingface_hub
Browse files
ms-swift/.github/workflows/publish.yaml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: release
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
tags:
|
| 6 |
+
- 'v**'
|
| 7 |
+
|
| 8 |
+
concurrency:
|
| 9 |
+
group: ${{ github.workflow }}-${{ github.ref }}-publish
|
| 10 |
+
cancel-in-progress: true
|
| 11 |
+
|
| 12 |
+
jobs:
|
| 13 |
+
build-n-publish:
|
| 14 |
+
runs-on: ubuntu-22.04
|
| 15 |
+
#if: startsWith(github.event.ref, 'refs/tags')
|
| 16 |
+
steps:
|
| 17 |
+
- uses: actions/checkout@v2
|
| 18 |
+
- name: Set up Python 3.10
|
| 19 |
+
uses: actions/setup-python@v2
|
| 20 |
+
with:
|
| 21 |
+
python-version: '3.10'
|
| 22 |
+
- name: Install wheel
|
| 23 |
+
run: pip install wheel packaging setuptools==69.5.1
|
| 24 |
+
- name: Build ModelScope Swift
|
| 25 |
+
run: python setup.py sdist bdist_wheel
|
| 26 |
+
- name: Publish package to PyPI
|
| 27 |
+
run: |
|
| 28 |
+
pip install twine
|
| 29 |
+
twine upload dist/* --skip-existing -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
|