Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Commit 026373c

Browse files
glad-gradientnavado
authored andcommitted
Prepare build package
1 parent 7d85a88 commit 026373c

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
branches: [ develop ]
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Determine Version
15+
id: release-version
16+
run: |
17+
echo "::set-output name=full::${{ github.ref_name }}"
18+
SIMPLE=$(echo ${{ github.ref_name }} | sed -e s/^v//)
19+
echo "::set-output name=simple::$SIMPLE"
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: |
25+
3.7
26+
3.8
27+
3.9
28+
3.10
29+
30+
- name: Install dependencies
31+
run: |
32+
curl -sSL https://install.python-poetry.org | python3 - --version 1.3.1
33+
poetry install
34+
35+
- name: Build package
36+
run: poetry build
37+
38+
- name: Upload Release Asset (built sdist)
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
upload_url: ${{ github.event.release.upload_url }}
44+
asset_path: ./dist/upsolver_sdk_python-${{ steps.release-version.outputs.simple }}.tar.gz
45+
asset_name: upsolver_sdk_python.tar.gz
46+
asset_content_type: application/tar+gz
47+
48+
- name: Upload Release Asset (built wheel)
49+
uses: actions/upload-release-asset@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ github.event.release.upload_url }}
54+
asset_path: ./dist/upsolver_sdk_python-${{ steps.release-version.outputs.simple }}-py3-none-any.whl
55+
asset_name: upsolver_sdk_python.whl
56+
asset_content_type: application/whl

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name = "upsolver-sdk-python"
33
version = "0.1.0"
44
description = "Python API and SDK for Upsolver"
55
authors = ["Your Name <you@example.com>"]
6-
license = "TBD"
7-
readme = ["README.md", "upsolver/dbapi/README.md"]
6+
7+
license = "MIT"
8+
readme = "README.md"
89
packages = [
10+
{include = "upsolver/__init__.py"},
911
{include = "upsolver/utils.py"},
1012
{include = "upsolver/sdk"},
1113
{include = "upsolver/dbapi"},
1214
{include = "upsolver/client"}
1315
]
14-
1516
[tool.poetry.dependencies]
1617
python = "^3.7"
1718
requests = "2.28.2"

upsolver/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import pkg_resources
2+
__version__ = pkg_resources.get_distribution('upsolver-sdk-python').version

0 commit comments

Comments
 (0)