Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdaes committed Aug 5, 2023
1 parent 28adeec commit a379afa
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 61 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/checkTranslatorsComments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Check that all translatable strings have translators comments

on:
push:
# Run this workflow if push tag or in master branch
tags: ["*"]
branches: [ main , master ]
pull_request:
branches:
- main
workflow_dispatch:

jobs:
buildPotFileAndCheckTranslatorsComments:

runs-on: ubuntu-latest

steps:
- 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: Generate the .pot file
run: scons pot

- name: Download NVDA's checkPot.py
run: curl https://raw.githubusercontent.com/nvaccess/nvda/master/tests/checkPot.py -O

- name: Run checkPot
id: runCheckPot
#run: |
# from . import checkPot
# checkPot.EXPECTED_MESSAGES_WITHOUT_COMMENTS = set()
# res = checkPot.checkPot('$(ls *.pot)')
# exit(res)
#shell: python
run: |
python -c "import checkPot;checkPot.EXPECTED_MESSAGES_WITHOUT_COMMENTS = set();exit(checkPot.checkPot('$(ls *.pot)'))"
echo "nb_errors=$?" >> "$GITHUB_OUTPUT"
- name: Notify
run: |
if [[ ${{ steps.runCheckPot.outputs.nb_errors }} == 0 ]];
then
echo "Translators comments: PASS"
exit 0;
else
echo "Translators comments: FAIL"
exit 1;
fi
50 changes: 0 additions & 50 deletions .github/workflows/manualRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,8 @@ on:
type: boolean
signAddOn:
description: 'Sign add-on with GPG'
default: false
type: boolean
publishOnStore:
description: 'Publish on add-on datastore'
default: true
type: boolean
channel:
description: 'Add-on channel for store'
default: stable
type: choice
options:
- stable
- beta
license:
description: 'Add-on license'
default: 'GPL v2'
licenseURL:
description: 'Add-on license URL'
default: 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.html'

jobs:
buildAndUpload:
Expand Down Expand Up @@ -94,36 +77,3 @@ jobs:
generateReleaseNotes: true
prerelease: ${{ inputs.prerelease }}

store:
needs: buildAndUpload
if: ${{ inputs.publishOnStore }}
runs-on: windows-latest

steps:
- name: Checkout validation repo
uses: actions/checkout@v3
with:
repository: nvaccess/addon-datastore-validation
submodules: true
path: validation
- name: Checkout datastore repo
uses: actions/checkout@v3
with:
repository: nvaccess/addon-datastore
path: store
- name: Download add-on
run: |
curl --location --output addon.nvda-addon ${{ github.event.repository.html_url }}/releases/download/${{ inputs.version }}/${{ github.event.repository.name }}-${{ inputs.version }}.nvda-addon
- name: Create json
run: |
validation\runcreatejson -f addon.nvda-addon --dir store\addons --channel=${{ inputs.channel }} --publisher=${{ github.event.sender.login }} --sourceUrl=${{ github.event.repository.html_url }}/ --url=${{ github.event.repository.html_url }}/releases/download/${{ inputs.version }}/${{ github.event.repository.name }}-${{ inputs.version }}.nvda-addon --licName="${{ inputs.license }}" --licUrl=${{ inputs.licenseURL }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PR_ACCESS_TOKEN }}
path: store
commit-message: Add ${{ github.event.repository.name }} ${{ inputs.version }} add-on
branch: ${{ github.event.repository.name}}-${{ inputs.version }}
delete-branch: true
title: Add ${{ github.event.repository.name }} ${{ inputs.version }} add-on
push-to-fork: ${{ github.event.sender.login }}/addon-datastore
11 changes: 0 additions & 11 deletions .github/workflows/testWithNVDA.yaml

This file was deleted.

0 comments on commit a379afa

Please sign in to comment.