Skip to content

Commit

Permalink
feat: add semantic versioning automation with GitHub Actions
Browse files Browse the repository at this point in the history
- Added GitHub Actions workflow for automated semantic versioning (`release.yml`)
- Configured semantic-release with commit analyzer and changelog generation (`.releaserc.json`)
- Updated `.gitignore` to exclude log files
- Added `pyproject.toml` for build system configuration
- Created `setup.py` for packaging and PyPI publishing
- Included `LICENSE.md` with MIT license
- Added `package.json` for managing semantic-release dependencies
  • Loading branch information
atxtechbro committed Oct 21, 2024
1 parent b642841 commit 376e249
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ venv/

plugins

*.log
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -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"]
]
}
5 changes: 5 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MIT License

Copyright (c) 2024 Morgan Joyce

Permission is hereby granted, free of charge, to any person obtaining a copy...
Empty file added __init__.py
Empty file.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
31 changes: 31 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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='[email protected]',
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
],
},
)

0 comments on commit 376e249

Please sign in to comment.