Skip to content

Commit

Permalink
pypi: add initial acton to publish the pypi packages
Browse files Browse the repository at this point in the history
Signed-off-by: Lu, Ken <ken.lu@intel.com>
  • Loading branch information
kenplusplus committed Dec 27, 2023
1 parent 528981a commit f9c8892
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/publish-pypi-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish pycloudstack package to PyPI

on:
workflow_dispatch:


jobs:
publish_pypi:
name: Publish pycloudstack package
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Checkout action repository
uses: actions/checkout@v3

- name: Publish package
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install --upgrade twine build
pushd common/python/
python3 -m build
python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD --repository pypi dist/*
popd
pushd vmsdk/python/
python3 -m build
python3 -m twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD --repository pypi dist/*
popd
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ Module.symvers
Mkfile.old
dkms.conf

__pycache__/
__pycache__/

venv/
dist/
*.egg-info/
30 changes: 30 additions & 0 deletions common/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[project]
name = "cctrusted_base"
version = "0.0.3"
authors = [
{ name="Lu, Ken", email="ken.lu@intel.com" },
{ name="Zhang, Wenhui", email="wenhui.zhang@bytedance.com" },
]
description = "CC Trusted API Base SDK"
readme = "README.md"
license = { text="Apache Software License" }
requires-python = ">=3.6"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
]
dependencies = [
]

[project.urls]
"Homepage" = "https://github.com/cc-api/cc-trusted-api"
"Bug Tracker" = "https://github.com/cc-api/cc-trusted-api/issues"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where=["."]
include=["cctrusted_base"]
30 changes: 30 additions & 0 deletions vmsdk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[project]
name = "cctrusted_vm"
version = "0.0.3"
authors = [
{ name="Lu, Ken", email="ken.lu@intel.com" },
{ name="Zhang, Wenhui", email="wenhui.zhang@bytedance.com" },
]
description = "CC Trusted API VM SDK"
readme = "README.md"
license = { text="Apache Software License" }
requires-python = ">=3.6"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
]
dependencies = [
]

[project.urls]
"Homepage" = "https://github.com/cc-api/cc-trusted-api"
"Bug Tracker" = "https://github.com/cc-api/cc-trusted-api/issues"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where=["."]
include=["cctrusted_vm"]

0 comments on commit f9c8892

Please sign in to comment.