diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..512f214 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,70 @@ +# This workflow will upload a Python Package to PyPI when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: 🐍 Publish Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + release-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build release distributions + run: | + # NOTE: put your own distribution build steps here. + python -m pip install build + python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + + # Dedicated environments with protections for publishing are strongly recommended. + # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules + environment: + name: pypi + # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: + url: https://pypi.org/p/lt25 + # + # ALTERNATIVE: if your GitHub Release name is the PyPI project version string + # ALTERNATIVE: exactly, uncomment the following line instead: + # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }} + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ diff --git a/README.md b/README.md index 5cd218f..ade5d16 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ [![wakatime](https://wakatime.com/badge/user/7482ea9d-3085-4e9b-95ad-1ca78a14d948/project/08632cd5-4928-49fb-8d0d-2d8f2bebbdad.svg)](https://wakatime.com/badge/user/7482ea9d-3085-4e9b-95ad-1ca78a14d948/project/08632cd5-4928-49fb-8d0d-2d8f2bebbdad) ![MIT License](https://img.shields.io/github/license/bendertools/lt25.py) -🎸 A cross-platform Python module for interacting with the LT25 amplifier made by a certain equine-named guitar manufacture that rhymes with "bender". +🎸 A cross-platform Python module for interacting with the LT25 amplifier from a certain guitar company that rhymes with "bender" and names products after horses. ## 👋 Introduction -I made this module because I was disappointed by the lack of certain features in both my amp itself as well as the associated desktop app provided by its manufacturer. Failing to find solutions which used modern languages/technologies I could build upon (.NET doesnt count), I made my own package based on the reverse-engineering work others initiated. +I made this libray because I was disappointed by the lack of certain features in both my amp itself as well as the associated desktop app provided by its manufacturer. Failing to find a starting point which used modern languages/technologies I could build upon (.NET doesnt count), I developed this little module based on the reverse-engineering work others initiated. ### ⚙️ Specifications -This library requires Python 3.8+ to be installed on your system (due to demands of the protobuf 5 module). Additionally, the library only supports HID USB operations (not MIDI) +This library requires Python 3.8+ to be installed on your system (due to demands of the protobuf 5 module). Additionally, the library only supports HID USB operations (no MIDI). ## 🚀 Quickstart @@ -30,10 +30,10 @@ For full documentation of the LT25 and LT25Async classes, refer to the [wiki](/w **Demonstration loop:** > [!WARNING] -> On some linux distros, `sudo`-mode is required for interacting with USB devices. +> On some linux distros, `sudo`-mode is required for running python files which interact with USB devices. -``` +```python import time import lt25 @@ -76,14 +76,15 @@ Other TODOs: - [x] Continuous Deployment - [x] LT25Async/Base Classes - [ ] Unit Testing +- [ ] Complete Protocol - [ ] Other Amps ## 🛠️ Contributing > [!NOTE] -> If you need to contribute in a way which updates protocol classes, you can find the original .proto files in Brent Maxwell's [repository](https://github.com/brentmaxwell/LtAmp/). I unfortunately cannot include these files in this module due to copy-left licensing restrictions. +> If you need to contribute in a way which updates protocol classes, you can find the original .proto files in Brent Maxwell's [repository](https://github.com/brentmaxwell/LtAmp/). I unfortunately cannot include these files in this module due to copyleft licensing restrictions. -lt25.py is licensed under the permissive MIT license, which means that you may fork, modify, adapt, and redistribute with few restrictions. However, if you wish to contribute your changes back to the base module, please open a pull request. To report bugs, request features, or discuss the project, open an issue or discussion! +lt25.py is licensed under the permissive MIT license, which means that you may fork, modify, adapt, and redistribute with few restrictions. If you wish to contribute your changes back to the base module, please open a [pull request](/pulls). To report bugs, request features, or discuss the project, open an [issue](/issues) or [discussion](/discussions). ## 🙌 Acknowledgements