Release v0.4.0
This commit is contained in:
		
							parent
							
								
									1c6ae8f4a2
								
							
						
					
					
						commit
						937fc5fd5f
					
				
					 4 changed files with 47 additions and 13 deletions
				
			
		
							
								
								
									
										39
									
								
								.github/workflows/python-publish.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/python-publish.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | ||||||
|  | # This workflow will upload a Python Package using Twine when a release is created | ||||||
|  | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||||||
|  | 
 | ||||||
|  | # This workflow uses actions that are not certified by GitHub. | ||||||
|  | # They are provided by a third-party and are governed by | ||||||
|  | # separate terms of service, privacy policy, and support | ||||||
|  | # documentation. | ||||||
|  | 
 | ||||||
|  | name: Upload Python Package | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   release: | ||||||
|  |     types: [published] | ||||||
|  | 
 | ||||||
|  | permissions: | ||||||
|  |   contents: read | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   deploy: | ||||||
|  | 
 | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  | 
 | ||||||
|  |     steps: | ||||||
|  |     - uses: actions/checkout@v3 | ||||||
|  |     - name: Set up Python | ||||||
|  |       uses: actions/setup-python@v3 | ||||||
|  |       with: | ||||||
|  |         python-version: '3.x' | ||||||
|  |     - name: Install dependencies | ||||||
|  |       run: | | ||||||
|  |         python -m pip install --upgrade pip | ||||||
|  |         pip install build | ||||||
|  |     - name: Build package | ||||||
|  |       run: python -m build | ||||||
|  |     - name: Publish package | ||||||
|  |       uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||||||
|  |       with: | ||||||
|  |         user: __token__ | ||||||
|  |         password: ${{ secrets.PYPI_API_TOKEN }} | ||||||
|  | @ -2,7 +2,7 @@ import os | ||||||
| import sys | import sys | ||||||
| import subprocess | import subprocess | ||||||
| 
 | 
 | ||||||
| VERSION = "{{VERSION_PLACEHOLDER}}" | VERSION = "0.4.0" | ||||||
| MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) | MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) | ||||||
| ARGV0 = os.path.basename(sys.argv[0]) | ARGV0 = os.path.basename(sys.argv[0]) | ||||||
| OSDK_DIR = ".osdk" | OSDK_DIR = ".osdk" | ||||||
|  |  | ||||||
|  | @ -58,10 +58,3 @@ def asList(i: T | list[T] | None) -> list[T]: | ||||||
|     if isinstance(i, list): |     if isinstance(i, list): | ||||||
|         return cast(list[T], i) |         return cast(list[T], i) | ||||||
|     return [i] |     return [i] | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| def get_version() -> str: |  | ||||||
|     if const.VERSION == "{{VERSION_PLACEHOLDER}}": |  | ||||||
|         return str(int(shell.popen(*["git", "rev-parse", "--short", "HEAD"])[:-1], 16)) |  | ||||||
|     else: |  | ||||||
|         return const.VERSION |  | ||||||
							
								
								
									
										12
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								setup.py
									
										
									
									
									
								
							|  | @ -1,14 +1,14 @@ | ||||||
| from setuptools import setup | from setuptools import setup | ||||||
| from osdk.utils import get_version | from osdk.const import VERSION | ||||||
| 
 | 
 | ||||||
| setup( | setup( | ||||||
|     name="osdk", |     name="osdk", | ||||||
|     version=get_version(), |     version=VERSION, | ||||||
|     python_requires='>=3.10', |     python_requires='>=3.10', | ||||||
|     description="Operating System Development Kit", |     description="Operating System Development Kit", | ||||||
|     author="The DEVSE Community", |     author="Cute Engineering", | ||||||
|     author_email="contact@devse.wiki", |     author_email="contact@cute.engineering", | ||||||
|     url="https://devse.wiki/", |     url="https://cute.engineering/", | ||||||
|     packages=["osdk"], |     packages=["osdk"], | ||||||
|     install_requires=[ |     install_requires=[ | ||||||
|         "requests", |         "requests", | ||||||
|  | @ -21,4 +21,6 @@ setup( | ||||||
|     }, |     }, | ||||||
|     license="MIT", |     license="MIT", | ||||||
|     platforms="any", |     platforms="any", | ||||||
|  |     long_description=open("README.md").read(), | ||||||
|  |     long_description_content_type="text/markdown", | ||||||
| ) | ) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue