Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 30 additions & 9 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ name: build addon
on:
push:
tags: ["*"]
# To build on main/master branch, uncomment the following line:
# branches: [ main , master ]
branches: [ main ]

pull_request:
branches: [ teleNVDA ]

workflow_dispatch:

permissions:
contents: write

jobs:
build:

Expand Down Expand Up @@ -38,7 +40,16 @@ jobs:
# run: export SKIP=no-commit-to-branch; pre-commit run --all

- name: building addon
run: scons && scons pot
shell: bash
run: |
rm -f ./*.nvda-addon
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
version="${GITHUB_REF_NAME#v}"
scons "version=${version}"
else
scons
fi
scons pot

- uses: actions/upload-artifact@v7.0.1
with:
Expand All @@ -49,23 +60,33 @@ jobs:

upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-') }}
needs: ["build"]
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/checkout@v7.0.0
- name: Remove old packages
run: rm -f ./*.nvda-addon
- name: download releases files
uses: actions/download-artifact@v8.0.1
- name: Display structure of downloaded files
run: ls -R
- name: Calculate sha256
run: sha256sum *.nvda-addon >> changelog.md
shell: bash
run: |
find . -type f -name '*.nvda-addon' -print0 | while IFS= read -r -d '' file; do
sha256sum "$file" > "$file.sha256"
done

- name: Release
uses: softprops/action-gh-release@v3.0.2
with:
tag_name: ${{ github.ref_name }}
target_commitish: ${{ github.sha }}
name: TeleNVDA ${{ github.ref_name }}
files: |
*.nvda-addon
*.pot
**/*.nvda-addon
**/*.nvda-addon.sha256
**/*.pot
body_path: changelog.md
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
prerelease: false
29 changes: 20 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
addon/doc/*.css
addon/doc/en/
*_docHandler.py
*.html
manifest.ini
*.mo
*.pot
*.py[co]
*.nvda-addon
# Python caches and compiled files
__pycache__/
*.py[cod]
*$py.class

# Generated add-on documentation
/addon/doc/*.css
/addon/doc/en/
/addon/doc/*/*.html




# Keep locally built add-on archives out of the public repository.
/*.nvda-addon
/*.nvda-addon.sha256

# Local certificates and SCons metadata
/server.pem
/teleNVDA-server.pem
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
87 changes: 87 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copied from https://github.com/nvaccess/nvda
# https://pre-commit.ci/
# Configuration for Continuous Integration service
ci:
# Pyright does not seem to work in pre-commit CI
skip: [pyright]
autoupdate_schedule: monthly
autoupdate_commit_msg: "Pre-commit auto-update"
autofix_commit_msg: "Pre-commit auto-fix"
submodules: true

default_language_version:
python: python3.13

repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config

- repo: meta
hooks:
# ensures that exclude directives apply to any file in the repository.
- id: check-useless-excludes
# ensures that the configured hooks apply to at least one file in the repository.
- id: check-hooks-apply

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Prevents commits to certain branches
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master", ]
# Checks that large files have not been added. Default cut-off for "large" files is 500kb.
- id: check-added-large-files
# Checks python syntax
- id: check-ast
# Checks for filenames that will conflict on case insensitive filesystems (the majority of Windows filesystems, most of the time)
- id: check-case-conflict
# Checks for artifacts from resolving merge conflicts.
- id: check-merge-conflict
# Checks Python files for debug statements, such as python's breakpoint function, or those inserted by some IDEs.
- id: debug-statements
# Removes trailing whitespace.
- id: trailing-whitespace
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Ensures all files end in 1 (and only 1) newline.
- id: end-of-file-fixer
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
- id: fix-byte-order-marker
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Validates TOML files.
- id: check-toml
# Validates YAML files.
- id: check-yaml
# Ensures that links to lines in files under version control point to a particular commit.
- id: check-vcs-permalinks
# Avoids using reserved Windows filenames.
- id: check-illegal-windows-names
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
# Ruff preserves indent/new-line formatting of function arguments, list items, and similar iterables,
# if a trailing comma is added.
# This adds a trailing comma to args/iterable items in case it was missed.
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in pyproject.
rev: v0.12.7
hooks:
- id: ruff
name: lint with ruff
args: [ --fix ]
- id: ruff-format
name: format with ruff

- repo: local
hooks:

- id: pyright
name: type check with pyright
entry: uv run pyright
language: system
types: [python]
2 changes: 0 additions & 2 deletions AGENTS.md

This file was deleted.

Loading