Skip to content

merge and bump version #19

merge and bump version

merge and bump version #19

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-publish
cancel-in-progress: true
jobs:
test-gate:
# Release gate: the mock-mode suite must pass before anything is built
# or uploaded. Same environment shape as downstream distro sandboxes.
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MODELSCOPE_RUN_REMOTE_TESTS: "false"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install package with dev dependencies
run: pip install -e ".[dev]"
- name: Run unit tests (mock mode)
run: pytest tests/ --ignore=tests/integration -q
build-n-publish:
needs: test-gate
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install build and twine
run: |
pip install build twine
- name: Build modelscope-hub
run: python -m build
- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/* --skip-existing