Skip to content

Commit d7fe281

Browse files
committed
Actions and pypi
1 parent 36c43be commit d7fe281

File tree

6 files changed

+123
-2
lines changed

6 files changed

+123
-2
lines changed

.github/workflows/merge.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Latest release
5+
6+
env:
7+
CACHE_VERSION: 1
8+
DEFAULT_PYTHON: "3.13"
9+
10+
# Only run on merges
11+
on:
12+
pull_request:
13+
types: closed
14+
branches:
15+
- main
16+
17+
jobs:
18+
publishing:
19+
name: Build and publish Python 🐍 distributions 📦 to PyPI
20+
runs-on: ubuntu-latest
21+
# Only trigger on merges, not just closes
22+
if: github.event.pull_request.merged == true
23+
steps:
24+
- name: Check out committed code
25+
uses: actions/checkout@v4
26+
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
27+
id: python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ env.DEFAULT_PYTHON }}
31+
- name: Install pypa/build
32+
run: >-
33+
python3 -m
34+
pip install
35+
build
36+
--user
37+
- name: Build a binary wheel and a source tarball
38+
run: python3 -m build
39+
- name: Publish distribution 📦 to PyPI
40+
uses: pypa/gh-action-pypi-publish@release/v1
41+
with:
42+
password: ${{ secrets.pypi_token }}
43+
skip-existing: true

.github/workflows/verify.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Latest commit
5+
6+
env:
7+
CACHE_VERSION: 1
8+
DEFAULT_PYTHON: "3.13"
9+
PRE_COMMIT_HOME: ~/.cache/pre-commit
10+
VENV: venv
11+
12+
on:
13+
schedule:
14+
- cron: "2 4 * * 0" # weekly
15+
workflow_dispatch:
16+
push:
17+
# pull_request:
18+
19+
jobs:
20+
# Check shellscripts
21+
shellcheck:
22+
name: Shellcheck
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Check out committed code
26+
uses: actions/checkout@v4
27+
- name: Run ShellCheck
28+
uses: ludeeus/action-shellcheck@master
29+
30+
test-publishing:
31+
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
32+
runs-on: ubuntu-latest
33+
needs:
34+
- cache
35+
- prepare
36+
- coverage
37+
- mypy
38+
steps:
39+
- name: Check out committed code
40+
uses: actions/checkout@v4
41+
- name: Install pypa/build
42+
run: |
43+
. venv/bin/activate
44+
uv pip install build
45+
- name: Build a binary wheel and a source tarball
46+
run: |
47+
. venv/bin/activate
48+
python3 -m build
49+
- name: Publish distribution 📦 to Test PyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1
51+
continue-on-error: true
52+
with:
53+
password: ${{ secrets.testpypi_token }}
54+
repository-url: https://test.pypi.org/legacy/
55+
skip-existing: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ venv
22
__pycache__
33
*.pyc
44
.*.swp
5-
/*.egg_info
5+
/*.egg-info
66
/build/
7+
dist
78
tests/__pycache__
89
.mypy_cache
910
.vscode

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 by @CoMPaTech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ubiquity airOS Module

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "airos"
7-
version = "0.0.1"
7+
version = "0.0.2"
88
license = "MIT"
99
description = "Ubiquity airOS module(s) for Python 3."
1010
readme = "README.md"

0 commit comments

Comments
 (0)