.github/workflows/release.yml #67
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 | |
- runs-on: windows-latest | |
arch: win-arm64 | |
- runs-on: macos-latest | |
arch: osx-arm64 | |
- runs-on: ubuntu-latest | |
arch: linux-arm64 | |
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.runs-on == 'windows-latest' }} | |
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.runs-on == 'windows-latest' }} | |
run: | | |
mkdir Microsoft.AI.DirectML | |
tar -xf Microsoft.AI.DirectML.nupkg -C Microsoft.AI.DirectML | |
- name: restore | |
run: dotnet restore OpenUtau -r ${{ matrix.os.arch }} | |
- name: build | |
run: dotnet publish OpenUtau -c Release -r ${{ matrix.os.arch }} --self-contained true -o bin/${{ matrix.os.arch }} | |
- name: add openutau.plugins.builtin | |
shell: pwsh | |
run: copy OpenUtau.Plugin.Builtin\bin\Release\netstandard2.1\OpenUtau.Plugin.Builtin.dll -Destination bin\${{ matrix.os.arch }} | |
- name: compress | |
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 DiffsingerPack | |
if: ${{ matrix.os.runs-on == 'windows-latest' }} | |
run: 7z a OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip ./bin/${{ matrix.os.arch }}/* | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip | |
path: OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip | |
- name: Upload artifact DiffsingerPack | |
if: ${{ matrix.os.runs-on == 'windows-latest' }} | |
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.runs-on == 'windows-latest' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ inputs.version }} | |
files: | | |
OpenUtau-${{ matrix.os.arch }}-${{ inputs.version }}-DiffsingerPack.zip |