6 Commits

Author SHA1 Message Date
1fb435416f run scons with pdm 2025-02-14 14:32:53 +00:00
40aaeb4c54 add ignore 2025-02-14 11:57:43 +00:00
17cdd84c51 add Taskfile
invoke tasks from pdm
2025-02-14 11:44:52 +00:00
43379f1b09 fix path in release step 2025-01-24 01:41:40 +00:00
dc9ac5ddc3 add name to download action 2025-01-24 01:31:27 +00:00
9764b9d827 upd workflow 2025-01-24 01:05:57 +00:00
4 changed files with 28 additions and 30 deletions

View File

@@ -34,7 +34,7 @@ jobs:
- name: building addon
run: pdm run scons
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged_addon
path: ./*.nvda-addon
@@ -44,15 +44,17 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: download releases files
uses: actions/download-artifact@v4.1.7
with:
name: packaged_addon
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: softprops/action-gh-release@v1
with:
files: packaged_addon/*.nvda-addon
files: ./*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}

21
Taskfile.yml Normal file
View File

@@ -0,0 +1,21 @@
version: '3'
vars:
SHELL: pwsh
SOURCE: addon\globalPlugins\voicemeeter
DEST: ${env:appdata}\nvda\scratchpad\globalPlugins\voicemeeter\
IGNORE: ${env:appdata}\nvda\scratchpad\globalPlugins\voicemeeter\__pycache__\
tasks:
copy:
desc: Copy sources files to scratchpad directory
platforms: [windows]
cmds:
- "{{.SHELL}} -Command 'robocopy {{.SOURCE}} {{.DEST}} /XD {{.IGNORE}} /NDL'"
ignore_error: true
build:
desc: Build the addon
platforms: [windows]
cmds:
- '{{.SHELL}} -Command "pdm run scons"'

View File

@@ -1,25 +0,0 @@
param (
[switch]$build
)
function Copy-FilesToScratchpad {
$source = Join-Path $PSScriptRoot "addon" "globalPlugins" "voicemeeter"
$target = Join-Path $env:appdata "nvda" "scratchpad" "globalPlugins" "voicemeeter"
Robocopy $source $target | Out-Null
}
function Build-Addon {
"Building add-on" | Write-Host
scons
}
function Main {
"Copying updated files to Scratchpad" | Write-Host
Copy-FilesToScratchpad
if ($build) {
Build-Addon
}
}
if ($MyInvocation.InvocationName -ne '.') { Main }

View File

@@ -20,8 +20,8 @@ build = [
distribution = false
[tool.pdm.scripts]
copy = "pwsh build.ps1"
build = "pwsh build.ps1 -build"
copy = "task copy"
build = "task build"
[tool.ruff]
exclude = [