diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b38db39..5e20c41 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -33,7 +33,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - - name: pip cache + - name: Pip cache uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} @@ -56,7 +56,7 @@ jobs: with: python-version: '3.9' - name: Get pip cache dir - id: pip-cache + id: Pip-cache run: | python -m pip install --upgrade pip setuptools echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f0c2cf6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Release + +on: + release: + types: [published] + +jobs: + pypi-publish: + strategy: + fail-fast: false + name: Build wheel file and upload release to PyPI + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Get pip cache dir + id: pip-cache + run: | + python -m pip install --upgrade pip setuptools + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + - name: Pip cache + uses: actions/cache@v3 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} + - name: Install dependencies + run: | + pip install -r requirements.txt --progress-bar off --upgrade + pip install -e ".[tests]" --progress-bar off --upgrade + - name: Build wheels + shell: bash + run: | + pip install --upgrade pip setuptools wheel twine build + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true diff --git a/kimm/__init__.py b/kimm/__init__.py index 8b8ffb2..407cc3c 100644 --- a/kimm/__init__.py +++ b/kimm/__init__.py @@ -1,4 +1,4 @@ from kimm import models # force to add models to the registry from kimm.utils.model_registry import list_models -__version__ = "0.1.0" +__version__ = "0.1.1"