Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: build addon

on:
push:
tags: ["*"]
# To build on main/master branch, uncomment the following line:
# branches: [ main , master ]

pull_request:
branches: [ main, master ]

workflow_dispatch:
workflow_call:

jobs:
build:
# Building the add-on template as an add-on does not make sense (and fails).
# Do not modify this repo name with your own one! (should remain the template)
if: github.repository != 'nvaccess/addonTemplate' && github.actor != 'github-actions[bot]'

permissions:
contents: write

runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y gettext
uv sync
- name: Code checks
id: codeChecks
continue-on-error: true
uses: j178/prek-action@v2
with:
extra-args: >-
--all-files
--skip pyright
- name: If code checks failed, commit changes
if: steps.codeChecks.outcome == 'failure'
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add -A
git commit -m "Apply code checks fixes"
git push
- name: building addon
run: uv run scons && uv run scons pot

- uses: actions/upload-artifact@v7
with:
name: packaged_addon
path: |
./*.nvda-addon
archive: false

- uses: actions/upload-artifact@v7
with:
name: translation_template
path: |
./*.pot
archive: false

upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: download all artifacts
uses: actions/download-artifact@v8
with:
path: .
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R
- name: Calculate sha256
run: |
echo -e "\nSHA256: " >> changelog.md
sha256sum *.nvda-addon >> changelog.md

- name: Release
uses: softprops/action-gh-release@v3
with:
files: |
*.nvda-addon
*.pot
body_path: changelog.md
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
93 changes: 0 additions & 93 deletions .github/workflows/codeql.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/fetchTranslationsFromCrowdin.yaml

This file was deleted.

87 changes: 0 additions & 87 deletions .pre-commit-config.yaml

This file was deleted.

Loading