Release v0.4.0
This commit is contained in:
parent
1c6ae8f4a2
commit
937fc5fd5f
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 subprocess
|
||||
|
||||
VERSION = "{{VERSION_PLACEHOLDER}}"
|
||||
VERSION = "0.4.0"
|
||||
MODULE_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
ARGV0 = os.path.basename(sys.argv[0])
|
||||
OSDK_DIR = ".osdk"
|
||||
|
|
|
@ -58,10 +58,3 @@ def asList(i: T | list[T] | None) -> list[T]:
|
|||
if isinstance(i, list):
|
||||
return cast(list[T], 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 osdk.utils import get_version
|
||||
from osdk.const import VERSION
|
||||
|
||||
setup(
|
||||
name="osdk",
|
||||
version=get_version(),
|
||||
version=VERSION,
|
||||
python_requires='>=3.10',
|
||||
description="Operating System Development Kit",
|
||||
author="The DEVSE Community",
|
||||
author_email="contact@devse.wiki",
|
||||
url="https://devse.wiki/",
|
||||
author="Cute Engineering",
|
||||
author_email="contact@cute.engineering",
|
||||
url="https://cute.engineering/",
|
||||
packages=["osdk"],
|
||||
install_requires=[
|
||||
"requests",
|
||||
|
@ -21,4 +21,6 @@ setup(
|
|||
},
|
||||
license="MIT",
|
||||
platforms="any",
|
||||
long_description=open("README.md").read(),
|
||||
long_description_content_type="text/markdown",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue