Skip to content

Commit

Permalink
version 23.5.2
Browse files Browse the repository at this point in the history
updated the github workflow to include the release info in a json file.
added a script to update version in the buildVars.py automatically if it as not been changed but is confirmed in a commit. this can be used manually, or automatically with a post commit hook.
updated sconstruct to generate the required json file for the add-on store. Currently this add-on is not in the add-on store, but I prefer to use the same workflow for all my add-ons.
updated buildVars to be compatible with the new sconstruct.
now *.json files are ignored.
  • Loading branch information
davidacm committed May 2, 2023
1 parent abfea4e commit 3e75448
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 60 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/upload-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
permissions:
contents: write
name: Upload on new tags

on:
push:
tags:
'*'
['*']
workflow_dispatch:

jobs:
buildAndUpload:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/checkout@v3
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.9
cache: 'pip'

- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
sudo apt install gettext
- name: Add add-on version
run: |
import re
Expand All @@ -31,16 +37,35 @@ jobs:
f.write(text)
f.truncate()
shell: python

- name: Build add-on
run: scons
- name: Calculate sha256
run: sha256sum *.nvda-addon >> changelog.md

- uses: actions/upload-artifact@v3
with:
name: packaged_addon
path: |
./*.nvda-addon
./*.json
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- name: download releases files
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
*.nvda-addon
body_path: changelog.md
prerelease: ${{ endsWith(github.ref, '-dev') }}
packaged_addon/*.json
packaged_addon/*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
addon/doc/*.css
addon/doc/en/
addon/synthDrivers/ibmtts
*_docHandler.py
*.html
*.ini
*.mo
*.py[co]
*.nvda-addon
*.code-workspace
setup.cfg
.sconsign.dblite
*.code-workspace
*.json
19 changes: 18 additions & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("""This is the IBMTTS synthesizer driver for NVDA."""),
# version
"addon_version" : "v23.02.1",
"addon_version" : "23.5.2",
# Author(s)
"addon_author" : u"David CM <dhf360@gmail.com>, x0 and others",
# URL for the add-on documentation support
Expand All @@ -32,6 +32,12 @@
"addon_lastTestedNVDAVersion" : "2023.1.0",
# Add-on update channel (default is stable or None)
"addon_updateChannel" : None,
# Add-on license such as GPL 2
"addon_license": "GPL 2",
# URL for the license document the ad-on is licensed under
"addon_licenseURL": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
# URL for the add-on repository where the source code can be found
"addon_sourceURL": "https://github.com/davidacm/NVDA-IBMTTS-Driver",
}


Expand All @@ -50,3 +56,14 @@
# Files that will be ignored when building the nvda-addon file
# Paths are relative to the addon directory, not to the root directory of your addon sources.
excludedFiles = []


# Base language for the NVDA add-on
baseLanguage = "en"

# Markdown extensions for add-on documentation
# Most add-ons do not require additional Markdown extensions.
# If you need to add support for markup such as tables, fill out the below list.
# Extensions string must be of the form "markdown.extensions.extensionName"
# e.g. "markdown.extensions.tables" to add tables.
markdownExtensions = []

0 comments on commit 3e75448

Please sign in to comment.