Skip to content

Merge pull request #106 from shigobu/AivisSpeech対応 #149

Merge pull request #106 from shigobu/AivisSpeech対応

Merge pull request #106 from shigobu/AivisSpeech対応 #149

Workflow file for this run

name: Build and Create Installer
on:
push:
branches: [ master ]
tags:
- "*"
pull_request:
branches: [ master ]
workflow_dispatch:
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: SAPIForVOICEVOX.sln
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
artifactName: SAPIForVOICEVOXsetup
permissions:
contents: read
jobs:
build:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
installerProjectPath: Setup\Setup.vdproj
installerOutDir: Setup\Release
bitLength: 32
- platform: x64
installerProjectPath: Setup64\Setup64.vdproj
installerOutDir: Setup64\Release
bitLength: 64
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Install dotnet script
run: dotnet tool install -g dotnet-script
- name: Change Version
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{env.GITHUB_WORKSPACE}}
run: dotnet script .\tools\change_version.csx -- .\ ${{github.ref_name}}
- name: Add devenv to PATH
uses: compnerd/gha-setup-vsdevenv@main
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: devenv.com ${{env.SOLUTION_FILE_PATH}} /build "${{env.BUILD_CONFIGURATION}}|${{matrix.platform}}"
# エラー抑止のため必要
- name: Run DisableOutOfProcBuild
shell: cmd
working-directory: ${{env.DevEnvDir}}CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild
run: DisableOutOfProcBuild.exe
- name: Create Installer
working-directory: ${{env.GITHUB_WORKSPACE}}
run: devenv.com ${{env.SOLUTION_FILE_PATH}} /project ${{matrix.installerProjectPath}} /build "${{env.BUILD_CONFIGURATION}}|${{matrix.platform}}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.artifactName}}${{matrix.bitLength}}
path: ${{matrix.installerOutDir}}
upload-to-release:
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
runs-on: windows-latest
steps:
- name: Download and extract artifact
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Rearchive artifacts
run: |
mkdir release
- name: Compress Installer
shell: pwsh
run: |
Compress-Archive -Path artifacts/${{env.artifactName}}32 -DestinationPath release/${{env.artifactName}}32.zip
Compress-Archive -Path artifacts/${{env.artifactName}}64 -DestinationPath release/${{env.artifactName}}64.zip
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
draft: true
body: |
下の、Assetsからダウンロードできます。
32bit版と64bit版があります。使用するアプリケーションに合わせて選択してください。
両方インストールすることができます。
末尾32が32bit版。末尾64が64bit版です。
files: release/*.zip