将当前系统日期作为程序版本号 #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
download-NVDA: | |
runs-on: ubuntu-latest | |
env: | |
NVDA: nvda_2024.1rc1.exe | |
NVDA_VERSION: 2024.1rc1 | |
NVDA_RELEASES_BASE_URL: https://www.nvaccess.org/files/nvda/releases/ | |
NVDA_SHAh256: 47380091cab8e817cfa37aadbbd077d15a38c4713ca888cf6f674783a3210987 | |
outputs: | |
NVDA: ${{ env.NVDA }} | |
steps: | |
- name: Cache ${{ env.NVDA }} | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/${{ env.NVDA }} | |
key: nvda_${{ env.NVDA_VERSION }}_${{ env.NVDA_SHAh256 }} | |
restore-keys: | | |
${{ env.NVDA }} | |
enableCrossOsArchive: true | |
- name: Download ${{ env.NVDA }} | |
id: download-nvda | |
uses: carlosperate/download-file-action@v2 | |
with: | |
file-url: ${{ env.NVDA_RELEASES_BASE_URL }}/${{ env.NVDA_VERSION }}/${{ env.NVDA }} | |
sha256: ${{ env.NVDA_SHAh256 }} | |
- name: Upload ${{ env.NVDA }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.NVDA }} | |
path: ${{ steps.download-nvda.outputs.file-path }} | |
if-no-files-found: error | |
download-resource: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
resource: | |
- file: vcredist_x86.exe | |
URL: https://dl.nvdacn.com/Share/vcredist_x86.exe | |
sha256: B924AD8062EAF4E70437C8BE50FA612162795FF0839479546CE907FFA8D6E386 | |
- file: speech-aisound.zip | |
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/VocalizerVoice/aisound.zip | |
sha256: B4FE1BED8F699179C8FF00F7B6F85AF4FF190ADCE1CCDB6C08132F93B7341EB2 | |
- file: speech-VE.zip | |
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/VocalizerVoice/VE.zip | |
sha256: 35ACAC34551ED8288DC6185A33127F5109AD6CB8901B329667C095DC0085EDD3 | |
- file: speech-voice.zip | |
URL: https://dl.nvdacn.com/Share/voice.zip | |
sha256: AB2D6AFD7C5E12901DD3DA3CDC29325AA11A9DAB2EAC608D7B731993B2066450 | |
- file: speech-IBM_ViaVoice_TTS_Runtime-V6.405.exe | |
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/IBM_ViaVoice_TTS_Runtime-V6.405.exe | |
sha256: A0FB592EFBC838921931C5BB4B32C176FC618052B4DDBFD6B08D3FBC66DEE12A | |
steps: | |
- name: Cache ${{ matrix.resource.file }} | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/* | |
key: ${{ matrix.resource.file }}-${{ matrix.resource.sha256 }} | |
restore-keys: | | |
${{ matrix.resource.file }} | |
enableCrossOsArchive: true | |
- name: Download ${{ matrix.resource.file }} | |
id: download-Resource | |
uses: carlosperate/download-file-action@v2 | |
with: | |
file-url: ${{ matrix.resource.URL }} | |
sha256: ${{ matrix.resource.sha256 }} | |
- name: Upload ${{ matrix.resource.file }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.resource.file }} | |
path: ${{ steps.download-Resource.outputs.file-path }} | |
if-no-files-found: error | |
download-addons: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
addon: | |
- addonId: AiSound5 | |
URL: https://dl.nvdacn.com/NVDA-Addons/New/AISound5.nvda-addon | |
sha256: B67640578F524471B38098B45E8F7BA1C9E80EA407D5D6147E3B511AD9614AFA | |
addonVersionName: '23.04' | |
- addonId: DragAndDrop | |
URL: https://github.com/javidominguez/DragAndDrop/releases/download/2.2dev/DragAndDrop-2.2dev.nvda-addon | |
sha256: F7056F62968C1F432D99641E030AD58A8BF49EDF3A7975205F65015D5A334679 | |
addonVersionName: 2.2dev | |
- addonId: IBMTTS | |
URL: https://dl.nvdacn.com/NVDA-Addons/New/IBMTTS-23.12.1.nvda-addon | |
sha256: F96353B0329FB66319FC98B5748AB9D03C2A236762CF29F3B99EBACD04635451 | |
addonVersionName: 23.12.1 | |
- addonId: numberProcessing | |
URL: https://github.com/ABuffEr/numberProcessing/releases/download/20230310-dev/numberProcessing-20230310-dev.nvda-addon | |
sha256: E57468DD9A995E087EB1F9A7A140C6303EC518292DE9D2185316FDC3CAD6FA8B | |
addonVersionName: 20230310-dev | |
- addonId: WorldVoice | |
URL: https://github.com/tsengwoody/WorldVoice/releases/download/v3.7/WorldVoice-3.7.nvda-addon | |
sha256: 8E25B0741769E6C84B2964D9701E0BE174605C795C3515524A6036C570AE35A9 | |
addonVersionName: 3.7 | |
steps: | |
- name: Cache ${{ matrix.addon.addonId }}-${{ matrix.addon.addonVersionName }} Addon | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/*.nvda-addon | |
key: ${{ matrix.addon.addonId }}-${{ matrix.addon.addonVersionName }}-${{ matrix.addon.sha256 }} | |
restore-keys: | | |
${{ matrix.addon.addonId }}-${{ matrix.addon.addonVersionName }}.nvda-addon | |
enableCrossOsArchive: true | |
- name: Download ${{ matrix.addon.addonId }}-${{ matrix.addon.addonVersionName }} Addon | |
id: download-addon | |
uses: carlosperate/download-file-action@v2 | |
with: | |
file-url: ${{ matrix.addon.URL }} | |
sha256: ${{ matrix.addon.sha256 }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.addon.addonId }}-${{ matrix.addon.addonVersionName }}.nvda-addon | |
path: ${{ steps.download-addon.outputs.file-path }} | |
if-no-files-found: error | |
download-addons-from-addonStore: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
addon: | |
- addonId: addonsHelp | |
- addonId: addonUpdater | |
- addonId: audioManager | |
- addonId: baiduTranslation | |
- addonId: clipboardEnhancement | |
- addonId: enhancedTouchGestures | |
- addonId: goldenCursor | |
- addonId: ime_expressive | |
- addonId: MSEdgeDiscardAnnouncements | |
- addonId: NVDACNMirror | |
- addonId: QQEnhancement | |
- addonId: remote | |
- addonId: resourceMonitor | |
- addonId: unmute | |
- addonId: WakeSpeaker | |
- addonId: WeChatEnhancement | |
- addonId: wintenApps | |
- addonId: xyOCR | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: nvaccess/addon-datastore.git | |
ref: views | |
sparse-checkout: | | |
views/zh_CN/latest/${{ matrix.addon.addonId }} | |
path: ${{ github.workspace }}/addon-datastore | |
- name: get ${{ matrix.addon.addonId }} addon data | |
uses: antifree/json-to-variables@v1.1.2 | |
with: | |
filename: ${{ github.workspace}}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json | |
- name: Cache ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/*.nvda-addon | |
key: ${{ matrix.addon.addonId }}-${{ env.addonVersionName }}-${{ env.sha256 }} | |
restore-keys: | | |
${{ matrix.addon.addonId }}-${{ env.addonVersionName }}.nvda-addon | |
enableCrossOsArchive: true | |
- name: Download ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon | |
id: download-addon | |
uses: carlosperate/download-file-action@v2 | |
with: | |
file-url: ${{ env.URL }} | |
sha256: ${{ env.sha256 }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.addon.addonId }}-${{ env.addonVersionName }}.nvda-addon | |
path: ${{ steps.download-addon.outputs.file-path }} | |
if-no-files-found: error | |
build: | |
runs-on: windows-latest | |
needs: | |
- download-NVDA | |
- download-resource | |
- download-addons | |
- download-addons-from-addonStore | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download ${{ needs.download-NVDA.outputs.NVDA }} | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.download-NVDA.outputs.NVDA }} | |
path: ${{ github.workspace }}/Resource/ | |
- name: Download vcredist_x86.exe | |
uses: actions/download-artifact@v4 | |
with: | |
name: vcredist_x86.exe | |
path: ${{ github.workspace }}/Resource/ | |
- name: Download Speech Resource | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{ github.workspace }}/Resource/speech/ | |
pattern: speech-* | |
merge-multiple: true | |
- name: Download Resource Addons | |
uses: actions/download-artifact@v4 | |
with: | |
path: ${{ github.workspace }}/Resource/Addons/ | |
pattern: "*.nvda-addon" | |
merge-multiple: true | |
- run: ${{ github.workspace }}/执行脚本.bat GITHUB_ACTIONS | |
- name: Upload Output | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NVDA_Lazy_Edition | |
path: ${{ github.workspace }}/Output/Archive/* | |
upload_release: | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
needs: build | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: NVDA_Lazy_Edition | |
path: NVDA_Lazy_Edition | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: NVDA_Lazy_Edition/* | |
fail_on_unmatched_files: true | |
prerelease: ${{ contains(github.ref, 'rc') }} |