diff --git a/README.md b/README.md index a132fb4..bae18d9 100644 --- a/README.md +++ b/README.md @@ -257,4 +257,50 @@ The script generates several output files: ## License -This project is licensed under the MIT License - see the LICENSE file for details. \ No newline at end of file +This project is licensed under the MIT License - see the LICENSE file for details. + +## Publishing a Python Script on GitHub + +This project already uses git. If you are asking generally “what has to happen to publish a Python script on GitHub?”, here is a concise checklist you can follow for this or any Python script. + +Prerequisites: +- A GitHub account +- Git installed locally (git --version) + +Basic steps (new project): +1. Create/prepare your project directory + - Include: README.md, your .py files, optional LICENSE, optional requirements.txt +2. Initialize git and make the first commit + - git init + - git add . + - git commit -m "Initial commit" + - Optionally set the default branch to main: git branch -M main +3. Create a new, empty repository on GitHub + - In your browser: New repository → name it (e.g., TasmotaManager) → Create repository (do not add README if you already have one locally) +4. Add the GitHub remote and push + - git remote add origin https://github.com//.git + - git push -u origin main + +If you already have a local git repo (like this one): +- Ensure your latest work is committed: git add -A && git commit -m "Your message" +- Optionally rename your current branch to main: git branch -M main +- Create the GitHub repo (empty) via the web UI +- Add remote and push: + - git remote add origin https://github.com//.git + - git push -u origin main + +Recommended extras: +- .gitignore for Python (to avoid committing virtualenvs, __pycache__, etc.) + - See GitHub’s Python template: https://github.com/github/gitignore/blob/main/Python.gitignore + - Save it as .gitignore at the project root, then commit it +- LICENSE file so others know how they can use your code (MIT, Apache-2.0, etc.) +- requirements.txt if your script uses external packages (pip freeze > requirements.txt or hand-curate) +- A brief Usage section in README with example commands + +Optional but useful: +- Create a release tag once you reach a stable point: + - git tag -a v1.0.0 -m "First stable release" + - git push origin v1.0.0 +- Enable GitHub Actions for basic CI (tests/linters). Example starter workflow: https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml + +That’s all that has to happen to publish a Python script on GitHub: have a local git repository, connect it to a new GitHub repository (remote), and push your commits. After that, you can collaborate, open issues/PRs, and manage releases directly on GitHub.