Skip to content

.github/workflows/release.yml #4

.github/workflows/release.yml

.github/workflows/release.yml #4

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
steps:
- uses: actions/checkout@v1
- name: Patch Versions
uses: justalemon/[email protected]
with:
version: ${{ inputs.version }}
csproj-files: "PhonemizerOnUtau/*.csproj"
- name: restore x64
run: dotnet restore PhonemizerOnUtau -r ${{ matrix.os.arch }}
- name: build PhonemizerOnUtau x64
run: dotnet publish PhonemizerOnUtau -c Release -r ${{ matrix.os.arch }} -o bin/${{ matrix.os.arch }}
- name: build OpenUtau.Plugin.Builtin x64
run: dotnet build OpenUtau.Plugin.Builtin -c Release -r ${{ matrix.os.arch }}
- name: add OpenUtau.Plugin.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.Plugin.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 PhonemizerOnUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip ./bin/${{ matrix.os.arch }}/*
- name: Upload artifact x64
uses: actions/[email protected]
with:
name: PhonemizerOnUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip
path: PhonemizerOnUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip
- name: Create release and upload artifact
if: ${{ inputs.create-release }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.version }}
files: |
PhonemizerOnUtau-${{ matrix.os.arch }}-${{ inputs.version }}.zip