Skip to content

Commit

Permalink
updated sconstruct and github workflow to support compatibility with …
Browse files Browse the repository at this point in the history
…nvda.org add-on store.

updated readme download section to get the correct asset.
  • Loading branch information
davidacm committed Apr 27, 2023
1 parent df80af6 commit fcbb381
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 60 deletions.
47 changes: 36 additions & 11 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@v3
- name: Set up Python 3.8
uses: actions/[email protected]
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
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 @@ -30,17 +36,36 @@ jobs:
f.seek(0)
f.write(text)
f.truncate()
shell: python
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/*.nvda-addon
packaged_addon/*.json
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
2 changes: 1 addition & 1 deletion EnhancedPhoneticReading.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 'EnhancedPhoneticReading' '1.1.3'\n"
"Report-Msgid-Bugs-To: '[email protected]'\n"
"POT-Creation-Date: 2022-07-25 10:36-0600\n"
"POT-Creation-Date: 2023-04-15 09:26-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion addon/doc/it/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Questo pacchetto è distribuito secondo i termini della GNU General Public Licen

## Download.
L'ultima versione è disponibile per il
[download a questo link](https://davidacm.github.io/getlatest/gh/davidacm/EnhancedPhoneticReading)
[download a questo link](https://davidacm.github.io/getlatest/gh/davidacm/EnhancedPhoneticReading/?index=1)

## Funzionalità.

Expand Down
16 changes: 16 additions & 0 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"addon_lastTestedNVDAVersion" : "2023.1",
# Add-on update channel (default is stable or None)
"addon_updateChannel": "stable",
# 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/EnhancedPhoneticReading",
}

from os import path
Expand All @@ -48,3 +54,13 @@
# 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 = []
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This package is distributed under the terms of the GNU General Public License, v

## Download.
The latest release is available to
[download in this link](https://davidacm.github.io/getlatest/gh/davidacm/EnhancedPhoneticReading)
[download in this link](https://davidacm.github.io/getlatest/gh/davidacm/EnhancedPhoneticReading/?index=1)

## Features.

Expand Down
Loading

0 comments on commit fcbb381

Please sign in to comment.