feat: Add CI/CD workflow and support badge

Introduced a new CI/CD GitHub Actions workflow for automated testing and publishing to PyPI, targeting Python 3.10 containers. This setup ensures code is tested before release and automates the distribution process to PyPI whenever a new tag is pushed. Additionally, updated README.md to include a support badge from private.coffee, encouraging community support and visibility.

This enhancement simplifies the release process, improves code quality assurance, and fosters community engagement by providing a direct way to support the project.
This commit is contained in:
Kumi 2024-04-15 18:11:42 +02:00
parent 1e59c90df2
commit 35db931f4a
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,53 @@
name: Python Package CI/CD
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
setup:
name: Setup and Test
container:
image: python:3.10
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python environment
run: |
python -V
python -m venv venv
source venv/bin/activate
pip install -U pip
pip install .[all]
publish:
name: Publish to PyPI
container:
image: python:3.10
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install publishing tools
run: |
pip install -U hatchling twine build
- name: Build the package
run: |
python -m build .
- name: Publish the package to PyPI
run: |
python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/*
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

View file

@ -1,5 +1,7 @@
# GPTbot # GPTbot
[![Support Private.coffee!](https://shields.private.coffee/badge/private.coffee-support%20us!-pink?logo=coffeescript)](https://private.coffee)
GPTbot is a simple bot that uses different APIs to generate responses to GPTbot is a simple bot that uses different APIs to generate responses to
messages in a Matrix room. messages in a Matrix room.