mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2025-04-03 12:23:45 +01:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
e565283827 | |||
2d194e8e67 | |||
3aab5922ab | |||
1fb435416f | |||
40aaeb4c54 | |||
17cdd84c51 | |||
43379f1b09 | |||
dc9ac5ddc3 | |||
9764b9d827 |
37
.github/workflows/build_addon.yml
vendored
37
.github/workflows/build_addon.yml
vendored
@ -1,10 +1,9 @@
|
||||
name: build addon
|
||||
name: Build Addon
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["*"]
|
||||
# To build on main/master branch, uncomment the following line:
|
||||
# branches: [ main , master ]
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
@ -13,28 +12,27 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.11']
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up PDM
|
||||
uses: pdm-project/setup-pdm@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pdm sync -d -G build
|
||||
|
||||
- name: building addon
|
||||
- name: Build addon
|
||||
run: pdm run scons
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload build artifacts
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packaged_addon
|
||||
path: ./*.nvda-addon
|
||||
@ -42,17 +40,20 @@ jobs:
|
||||
upload_release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
needs: ["build"]
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: download releases files
|
||||
- name: Download releases files
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: packaged_addon
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
run: tree
|
||||
|
||||
- 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, '-') }}
|
||||
|
26
Taskfile.yml
Normal file
26
Taskfile.yml
Normal file
@ -0,0 +1,26 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
SHELL: pwsh
|
||||
|
||||
tasks:
|
||||
default:
|
||||
desc: Build the addon
|
||||
cmds:
|
||||
- task: build
|
||||
|
||||
copy:
|
||||
desc: Copy sources files to scratchpad directory
|
||||
platforms: [windows]
|
||||
vars:
|
||||
SOURCE: addon\globalPlugins\voicemeeter
|
||||
DEST: ${env:appdata}\nvda\scratchpad\globalPlugins\voicemeeter\
|
||||
cmds:
|
||||
- "{{.SHELL}} -Command 'robocopy {{.SOURCE}} {{.DEST}} /NDL'"
|
||||
ignore_error: true
|
||||
|
||||
build:
|
||||
desc: Build the addon
|
||||
platforms: [windows]
|
||||
cmds:
|
||||
- '{{.SHELL}} -Command "pdm run scons"'
|
25
build.ps1
25
build.ps1
@ -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 }
|
@ -20,8 +20,8 @@ build = [
|
||||
distribution = false
|
||||
|
||||
[tool.pdm.scripts]
|
||||
copy = "pwsh build.ps1"
|
||||
build = "pwsh build.ps1 -build"
|
||||
copy = "task copy"
|
||||
release = "task build"
|
||||
|
||||
[tool.ruff]
|
||||
exclude = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user