Get ready for PyPI
This commit is contained in:
		
							
								
								
									
										30
									
								
								.github/workflows/python-publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/python-publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
name: Upload Python Package
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  release:
 | 
			
		||||
    types: [published]
 | 
			
		||||
  workflow_dispatch: {}
 | 
			
		||||
 | 
			
		||||
permissions:
 | 
			
		||||
  contents: read
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
    - name: Set up Python
 | 
			
		||||
      uses: actions/setup-python@v3
 | 
			
		||||
      with:
 | 
			
		||||
        python-version: '3.x'
 | 
			
		||||
    - name: Install dependencies
 | 
			
		||||
      run: |
 | 
			
		||||
        python -m pip install --upgrade pip
 | 
			
		||||
        pip install build
 | 
			
		||||
    - name: Build package
 | 
			
		||||
      run: python -m build
 | 
			
		||||
    - name: Publish package
 | 
			
		||||
      uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
 | 
			
		||||
      with:
 | 
			
		||||
        user: __token__
 | 
			
		||||
        password: ${{ secrets.PYPI_API_TOKEN }}
 | 
			
		||||
@@ -6,8 +6,6 @@ I was not expecting to own a label printer, but after caming across to this onli
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
_The image on the printed label shown in the picture can be found [here.](https://github.com/ysfchn/dymo-bluetooth/blob/main/assets/example_image.png)_
 | 
			
		||||
 | 
			
		||||
<details>
 | 
			
		||||
<summary>More about this printer model</summary>
 | 
			
		||||
<br>
 | 
			
		||||
@@ -29,9 +27,11 @@ This project depends on [`bleak`](https://pypi.org/project/bleak/) for cross-pla
 | 
			
		||||
## Installation
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
python -m pip install --upgrade "https://github.com/ysfchn/dymo-bluetooth/archive/refs/heads/main.zip"
 | 
			
		||||
python -m pip install --upgrade dymo-bluetooth
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For `main` branch, you can use `https://github.com/ysfchn/dymo-bluetooth/archive/refs/heads/main.zip` as package name.
 | 
			
		||||
 | 
			
		||||
Python 3.10 or up is targeted, but 3.9 should work too. It depends on;
 | 
			
		||||
 | 
			
		||||
* `bleak` for Bluetooth communication.
 | 
			
		||||
@@ -41,7 +41,7 @@ Additionally, if `python-barcode` is installed (which is optional), it can be al
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
There is a CLI provided with the module to print images to the first found printer nearby.
 | 
			
		||||
There is a CLI provided with the module to print images to the first found printer nearby. If looking for a test image, you can try [this.](https://github.com/ysfchn/dymo-bluetooth/blob/main/assets/example_image.png)_
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
python -m dymo_bluetooth --help
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@ def main():
 | 
			
		||||
    )
 | 
			
		||||
    args.add_argument(
 | 
			
		||||
        "--ensure-mac", 
 | 
			
		||||
        default = 5, 
 | 
			
		||||
        default = False, 
 | 
			
		||||
        action = "store_true",
 | 
			
		||||
        help = (
 | 
			
		||||
            "Also ensures the MAC address does match with the pre-defined MAC prefixes when "
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
[project]
 | 
			
		||||
name = "dymo-bluetooth"
 | 
			
		||||
version = "0.0.2"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
authors = [{ name = "ysfchn" }]
 | 
			
		||||
license.file = "LICENSE"
 | 
			
		||||
readme = "README.md"
 | 
			
		||||
@@ -8,8 +8,7 @@ classifiers = [
 | 
			
		||||
    "Programming Language :: Python :: 3.10",
 | 
			
		||||
    "License :: OSI Approved :: MIT License",
 | 
			
		||||
    "Development Status :: 5 - Production/Stable",
 | 
			
		||||
    "Topic :: Printing",
 | 
			
		||||
    "Private :: Do Not Upload"
 | 
			
		||||
    "Topic :: Printing"
 | 
			
		||||
]
 | 
			
		||||
dependencies = [
 | 
			
		||||
    "bleak~=0.22.2",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user