.github/workflows/release.yml #65
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
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version Number' | |
default: '0.0.0.0' | |
required: true | |
type: string | |
create-release: | |
type: boolean | |
description: "Create Release" | |
jobs: | |
release: | |
runs-on: ${{ matrix.os.runs-on }} | |
strategy: | |
matrix: | |
os: | |
- runs-on: windows-latest | |
arch: win-x64 | |
- runs-on: macos-latest | |
arch: osx-x64 | |
- runs-on: ubuntu-latest | |
arch: linux-x64 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Patch Versions | |
uses: justalemon/[email protected] | |
with: | |
version: ${{ inputs.version }} | |
csproj-files: "OpenUtau/*.csproj" | |
- name: download directml dll from nuget | |
if: ${{ matrix.os.arch == 'win-x64' }} | |
uses: carlosperate/[email protected] | |
with: | |
file-url: https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.12.0 | |
file-name: Microsoft.AI.DirectML.nupkg | |
location: . | |
- name: extract directml | |
if: ${{ matrix.os.arch == 'win-x64' }} | |
run: | | |
mkdir Microsoft.AI.DirectML | |
tar -xf Microsoft.AI.DirectML.nupkg -C Microsoft.AI.DirectML | |
- name: restore x64 | |
run: dotnet restore OpenUtau -r ${{ matrix.os.arch }} | |
- name: build x64 | |
run: dotnet publish OpenUtau -c Release -r ${{ matrix.os.arch }} --self-contained true -o bin/${{ matrix.os.arch }} | |
- name: add openutau.plugins.builtin (windows) | |
if: ${{ matrix.os.arch == 'win-x64' }} | |
run: copy OpenUtau.Plugin.Builtin\bin\Release\netstandard2.1\OpenUtau.Plugin.Builtin.dll -Destination bin\${{ matrix.os.arch }} | |
- name: add openutau.plugins.builtin (macos and linux) | |
if: ${{ matrix.os.arch == 'osx-x64' || matrix.os.arch == 'linux-x64' }} | |
run: cp OpenUtau.Plugin.Builtin/bin/Release/netstandard2.1/OpenUtau.Plugin.Builtin.dll bin/${{ matrix.os.arch }} | |
- name: compress x64 | |
run: 7z a OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip ./bin/${{ matrix.os.arch }}/* | |
- name: download vocoder | |
uses: carlosperate/[email protected] | |
with: | |
file-url: https://github.com/xunmengshe/OpenUtau/releases/download/0.0.0.0/nsf_hifigan.oudep | |
file-name: nsf_hifigan.oudep | |
location: ./ | |
- name: extract vocoder | |
run: 7z x -o"./bin/${{ matrix.os.arch }}/Dependencies/nsf_hifigan" ./nsf_hifigan.oudep | |
- name: download rhythmizer | |
uses: carlosperate/[email protected] | |
with: | |
file-url: https://github.com/xunmengshe/OpenUtau/releases/download/0.0.0.0/rhythmizer_zh_opencpop_strict.oudep | |
file-name: rhythmizer_zh_opencpop_strict.oudep | |
location: ./ | |
- name: extract rhythmizer | |
run: 7z x -o"./bin/${{ matrix.os.arch }}/Dependencies/rhythmizer_zh_opencpop_strict" ./rhythmizer_zh_opencpop_strict.oudep | |
- name: compress x64 DiffsingerPack | |
if: ${{ matrix.os.arch == 'win-x64' }} | |
run: 7z a OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip ./bin/${{ matrix.os.arch }}/* | |
- name: Upload artifact x64 | |
uses: actions/[email protected] | |
with: | |
name: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip | |
path: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip | |
- name: Upload artifact x64 DiffsingerPack | |
if: ${{ matrix.os.arch == 'win-x64' }} | |
uses: actions/[email protected] | |
with: | |
name: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip | |
path: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip | |
- name: Create release and upload artifact | |
if: ${{ inputs.create-release }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ inputs.version }} | |
files: | | |
OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip | |
- name: Create release and upload artifact DiffsingerPack | |
if: ${{ inputs.create-release && matrix.os.arch == 'win-x64' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ inputs.version }} | |
files: | | |
OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip |