Skip to content

Commit 22136f9

Browse files
Add pypi support (#17)
* Add `release.yml` * Update `version` * Fix bug * Update `release.yml` * Update
1 parent 03d84b4 commit 22136f9

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

.github/workflows/actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
python -m pip install --upgrade pip setuptools
3535
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
36-
- name: pip cache
36+
- name: Pip cache
3737
uses: actions/cache@v3
3838
with:
3939
path: ${{ steps.pip-cache.outputs.dir }}
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
python-version: '3.9'
5858
- name: Get pip cache dir
59-
id: pip-cache
59+
id: Pip-cache
6060
run: |
6161
python -m pip install --upgrade pip setuptools
6262
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
pypi-publish:
9+
strategy:
10+
fail-fast: false
11+
name: Build wheel file and upload release to PyPI
12+
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.9'
21+
- name: Get pip cache dir
22+
id: pip-cache
23+
run: |
24+
python -m pip install --upgrade pip setuptools
25+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
26+
- name: Pip cache
27+
uses: actions/cache@v3
28+
with:
29+
path: ${{ steps.pip-cache.outputs.dir }}
30+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}
31+
- name: Install dependencies
32+
run: |
33+
pip install -r requirements.txt --progress-bar off --upgrade
34+
pip install -e ".[tests]" --progress-bar off --upgrade
35+
- name: Build wheels
36+
shell: bash
37+
run: |
38+
pip install --upgrade pip setuptools wheel twine build
39+
python -m build
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
verbose: true

kimm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from kimm import models # force to add models to the registry
22
from kimm.utils.model_registry import list_models
33

4-
__version__ = "0.1.0"
4+
__version__ = "0.1.1"

0 commit comments

Comments
 (0)