Skip to content

.github/workflows/release.yml #17

.github/workflows/release.yml

.github/workflows/release.yml #17

Workflow file for this run

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/VersionPatcher@v0.7.1
with:
version: ${{ inputs.version }}
csproj-files: "OpenUtau/*.csproj"
- 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: DirectML
shell: cmd
run: |
curl -L https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.12.0 -o Microsoft.AI.DirectML.nupkg
mkdir Microsoft.AI.DirectML
tar -xf Microsoft.AI.DirectML.nupkg -C Microsoft.AI.DirectML
copy /y Microsoft.AI.DirectML\bin\${{ matrix.arch.arch }}-${{ matrix.arch.os }}\DirectML.dll bin\${{ matrix.arch.name }}\
if: ${{ matrix.arch.os == 'win' }}
- name: compress
run: 7z a ou-lunai-${{ matrix.os.arch }}.zip ./bin/${{ matrix.os.arch }}/*
- name: download vocoder
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: https://github.com/openvpi/vocoders/releases/download/nsf-hifigan-44.1k-hop512-128bin-2024.02/nsf_hifigan_44.1k_hop512_128bin_2024.02.oudep
file-name: nsf_hifigan_44.1k_hop512_128bin_2024.02.oudep
location: ./
- name: extract vocoder
run: 7z x -o"./bin/${{ matrix.os.arch }}/Dependencies/nsf_hifigan" ./nsf_hifigan_44.1k_hop512_128bin_2024.02.oudep
- name: compress vocoder
if: ${{ matrix.os.runs-on == 'windows-latest' }} or ${{ matrix.os.runs-on == 'macos-latest' }} or ${{ matrix.os.runs-on == 'ubuntu-latest' }}
run: 7z a ou-lunai-${{ matrix.os.arch }}.zip ./bin/${{ matrix.os.arch }}/*
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ou-lunai-${{ matrix.os.arch }}.zip
path: ou-lunai-${{ matrix.os.arch }}.zip
- name: Create release and upload artifact
if: ${{ inputs.create-release }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.version }}
files: |
ou-lunai-${{ matrix.os.arch }}.zip