Skip to content

Commit

Permalink
Make it an SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 13, 2024
1 parent 7d02f96 commit 5e7cdbb
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pypi-publish

on:
release:
types:
- published
push:
branches:
- main
paths:
- '**/*.py'
workflow_dispatch:
inputs:
dry_run:
description: Dry run mode
required: true
options:
- "true"
- "false"

jobs:
pypi-publisher:
runs-on: thevickypedia-lite
steps:
- name: Set dry-run
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "::notice title=DryRun::Setting dry run to ${{ inputs.dry_run }} for '${{ github.event_name }}' event"
echo "dry_run=${{ inputs.dry_run }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo "::notice title=DryRun::Setting dry run to true for '${{ github.event_name }}' event"
echo "dry_run=true" >> $GITHUB_ENV
else
echo "::notice title=DryRun::Setting dry run to false for '${{ github.event_name }}' event"
echo "dry_run=false" >> $GITHUB_ENV
fi
- uses: thevickypedia/pypi-publisher@v3
env:
token: ${{ secrets.PYPI_TOKEN }}
with:
dry-run: ${{ env.dry_run }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ logging.ini
*.db

!samples/*
*.yml
*.yaml
ngrok.yml
cloudfront_*.yaml
!.github/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# ngrok-cloudfront
Initiates an ngrok connection and creates/updates a cloudfront origin
# NCTL
Fuses ngrok and CloudFront offering a fully automated solution
6 changes: 6 additions & 0 deletions nctl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version = "0.0.0-a"


def commandline():
"""Work in progress."""
pass
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[project]
name = "nctl"
dynamic = ["version", "dependencies"]
description = "Fuses ngrok and CloudFront offering a fully automated solution."
readme = "README.md"
authors = [{ name = "Vignesh Rao", email = "[email protected]" }]
license = { file = "LICENSE" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux"
]
keywords = ["nctl", "ngrok", "cloudfront"]
requires-python = ">=3.10"

[tool.setuptools]
packages = ["nctl"]

[tool.setuptools.dynamic]
version = {attr = "nctl.version"}
dependencies = { file = ["requirements.txt"] }

[project.optional-dependencies]
dev = ["sphinx==5.1.1", "pre-commit", "recommonmark", "gitverse"]

[project.scripts]
# sends all the args to commandline function, where the arbitary commands as processed accordingly
nctl = "nctl:commandline"

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

[project.urls]
Homepage = "https://github.com/thevickypedia/nctl"
Docs = "https://thevickypedia.github.io/nctl"
Source = "https://github.com/thevickypedia/nctl"
"Bug Tracker" = "https://github.com/thevickypedia/nctl/issues"
"Release Notes" = "https://github.com/thevickypedia/nctl/blob/main/release_notes.rst"
Empty file removed src/__init__.py
Empty file.

0 comments on commit 5e7cdbb

Please sign in to comment.