Skip to content

Commit df5701b

Browse files
committed
v19
1 parent 839ee39 commit df5701b

33 files changed

+1325
-13
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: build addon
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
# To build on main/master branch, uncomment the following line:
7+
# branches: [ main , master ]
8+
9+
pull_request:
10+
branches: [ main, master ]
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.11
28+
cache: 'pip'
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip wheel
33+
pip install -r requirements.txt
34+
sudo apt-get update -y
35+
sudo apt-get install -y gettext
36+
37+
- name: Code checks
38+
run: export SKIP=no-commit-to-branch; pre-commit run --all
39+
40+
- name: building addon
41+
run: scons
42+
43+
- uses: actions/upload-artifact@v3
44+
with:
45+
name: packaged_addon
46+
path: ./*.nvda-addon
47+
48+
upload_release:
49+
runs-on: ubuntu-latest
50+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
51+
needs: ["build"]
52+
steps:
53+
- uses: actions/checkout@v3
54+
- name: download releases files
55+
uses: actions/download-artifact@v3
56+
- name: Display structure of downloaded files
57+
run: ls -R
58+
59+
- name: Release
60+
uses: softprops/action-gh-release@v1
61+
with:
62+
files: packaged_addon/*.nvda-addon
63+
fail_on_unmatched_files: true
64+
prerelease: ${{ contains(github.ref, '-') }}

NVDA addon/.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-ast
6+
- id: check-case-conflict
7+
- id: check-yaml

NVDA addon/.vscode/extensions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
// List of extensions which should be recommended for users of this workspace.
5+
"recommendations": [
6+
"ms-python.python",
7+
"ms-python.vscode-pylance",
8+
"redhat.vscode-yaml",
9+
"charliermarsh.ruff"
10+
],
11+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
12+
"unwantedRecommendations": []
13+
}

NVDA addon/.vscode/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"editor.accessibilitySupport": "on",
3+
"python.autoComplete.extraPaths": [
4+
"../nvda/source",
5+
"../nvda/miscDeps/python"
6+
],
7+
"files.insertFinalNewline": true,
8+
"files.trimFinalNewlines": true,
9+
"editor.insertSpaces": false,
10+
"python.analysis.stubPath": "${workspaceFolder}/.vscode/typings",
11+
"python.analysis.extraPaths": [
12+
"../nvda/source",
13+
"../nvda/miscDeps/python"
14+
],
15+
"python.defaultInterpreterPath": "${workspaceFolder}/../nvda/.venv/scripts/python.exe"
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def _(msg: str) -> str:
2+
...
3+
4+
5+
def pgettext(context: str, message: str) -> str:
6+
...

0 commit comments

Comments
 (0)