forked from nstockton/nvda-add-ons
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
1,746 additions
and
5,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Set default behaviour, in case users don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Try to ensure that po files in the repo does not include | ||
# source code line numbers. | ||
# Every person expected to commit po files should change their personal config file as described here: | ||
# https://mail.gnome.org/archives/kupfer-list/2010-June/msg00002.html | ||
*.po filter=cleanpo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: pre-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 0 * * 6' | ||
|
||
jobs: | ||
pre-release: | ||
uses: nvdaes/nvdaAddonWorkflows/.github/workflows/automaticRelease.yaml@main | ||
permissions: | ||
contents: write | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Check that we dont have extended ascii or utf boms in our files | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
extendedAsciiAndBom: | ||
uses: nvdaes/nvdaAddonWorkflows/.github/workflows/check-for-extended-ascii-and-utf-bom.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
lint: | ||
uses: nvdaes/nvdaAddonWorkflows/.github/workflows/lint.yaml@main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Manual release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Add-on version' | ||
required: true | ||
default: '0.0.0' | ||
prerelease: | ||
description: 'Mark as prerelease on GitHub' | ||
default: false | ||
type: boolean | ||
signAddOn: | ||
description: 'Sign add-on with GPG' | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
buildAndUpload: | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- id: checkoutCode | ||
name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
pip install scons markdown | ||
sudo apt update | ||
sudo apt install gettext | ||
- name: Add add-on version | ||
run: | | ||
import re | ||
with open("buildVars.py", 'r+', encoding='utf-8') as f: | ||
text = f.read() | ||
version = "${{ github.event.inputs.version }}" | ||
text = re.sub(r"\"addon_version\": .*?,", f"\"addon_version\": \"{version}\",", text) | ||
f.seek(0) | ||
f.write(text) | ||
f.truncate() | ||
shell: python | ||
- name: Build add-on | ||
run: scons | ||
- name: Push changes | ||
run: | | ||
git config --global user.name github-actions | ||
git config --global user.email github-actions@github.com | ||
git commit -a -m "Update buildVars" | ||
git push origin HEAD:main | ||
- id: import_gpg | ||
if: ${{ inputs.signAddOn }} | ||
name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
- if: ${{ inputs.signAddOn }} | ||
name: Sign add-on | ||
run: gpg --detach-sign *.nvda-addon | ||
- name: Calculate sha256 | ||
run: sha256sum *.nvda-addon >> sha256.txt | ||
- name: Create tag | ||
run: | | ||
git tag ${{ inputs.version }} | ||
git push origin ${{ inputs.version }} | ||
- name: Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ inputs.version }} | ||
artifacts: "*.nvda-addon,*.sig,publicKey.asc,sha256.txt" | ||
generateReleaseNotes: true | ||
prerelease: ${{ inputs.prerelease }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Build and test NVDA add-on | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
nvda: | ||
|
||
name: NVDA | ||
permissions: | ||
contents: write | ||
uses: nvdaes/nvdaAddonWorkflows/.github/workflows/testWithNVDA.yaml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,10 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
addon/doc/*.css | ||
addon/doc/en/ | ||
*_docHandler.py | ||
*.html | ||
*.ini | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
*.py[co] | ||
*.nvda-addon | ||
.sconsign.dblite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"redhat.vscode-yaml" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"editor.accessibilitySupport": "on", | ||
"python.linting.enabled": true, | ||
"python.linting.maxNumberOfProblems": 10000, | ||
"python.linting.flake8Args": [ | ||
"--config=flake8.ini" | ||
], | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.pylintEnabled": false, | ||
"python.autoComplete.extraPaths": [ | ||
"../nvda/source", | ||
"../nvda/miscDeps/python" | ||
], | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true, | ||
"editor.insertSpaces": false, | ||
"python.analysis.diagnosticSeverityOverrides": { | ||
"reportUndefinedVariable": "none" | ||
}, | ||
"python.analysis.extraPaths": [ | ||
"../nvda/source", | ||
"../nvda/miscDeps/python" | ||
], | ||
"python.defaultInterpreterPath": "../nvda/.venv/scripts/python.exe" | ||
} |
Oops, something went wrong.