diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8c186d5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "16" + + - name: Install dependencies + run: npm ci + + - name: Run semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release diff --git a/.gitignore b/.gitignore index b265086..3fac77c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ venv/ plugins +*.log diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..6abe4b7 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,16 @@ +{ + "branches": ["main"], + "plugins": [ + ["@semantic-release/commit-analyzer"], + ["@semantic-release/release-notes-generator"], + ["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }], + [ + "@semantic-release/git", + { + "assets": ["CHANGELOG.md", "setup.py"], + "message": "chore(release): ${nextRelease.version} [skip ci]" + } + ], + ["@semantic-release/github"] + ] +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0391191 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,5 @@ +MIT License + +Copyright (c) 2024 Morgan Joyce + +Permission is hereby granted, free of charge, to any person obtaining a copy... diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..acbd3a4 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^11.0.0", + "semantic-release": "^24.1.3" + } +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8fe2f47 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..8da5ede --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +from setuptools import find_packages, setup + +setup( + name='notion_automation', # Package name (used in `pip install`) + version='0.1.0', # Follow semantic versioning + description='Automate Notion database creation with JSON schemas', + long_description=open('README.md').read(), + long_description_content_type='text/markdown', + author='Your Name', + author_email='your.email@example.com', + url='https://github.com/yourusername/notion-automation', # GitHub repo link + packages=find_packages(), # Automatically detect packages + install_requires=[ + 'requests', + 'python-dotenv', + 'pydantic', + 'pytest', + 'requests-mock' + ], + classifiers=[ + 'Programming Language :: Python :: 3', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + ], + python_requires='>=3.6', + entry_points={ + 'console_scripts': [ + 'notion-cli=notion_automation.cli:main', # Command-line entry point + ], + }, +)