Skip to content

Commit d9fc30f

Browse files
authored
Create publish.yaml
1 parent 8f59d00 commit d9fc30f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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-20.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 && pip install -r requirements.txt
24+
- name: Build ModelScope
25+
run: python setup.py sdist bdist_wheel
26+
- name: Publish package to PyPI
27+
run: |
28+
pip install twine
29+
twine upload package/dist/* --skip-existing -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)