From 6b2d99f34418253a704c947e2b56d9d5d3f12e0f Mon Sep 17 00:00:00 2001 From: EX3 Date: Sun, 6 Oct 2024 18:57:16 +0900 Subject: [PATCH] Split deployments --- .github/workflows/release-linux.yml | 46 ++++++++++++++++ .github/workflows/release-osx.yml | 52 ++++++++++++++++++ .github/workflows/release-win.yml | 54 +++++++++++++++++++ .../GlobalSettingWindowViewModel.cs | 5 +- Mirivoice/Views/GlobalSettingWindow.axaml | 2 + 5 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-linux.yml create mode 100644 .github/workflows/release-osx.yml create mode 100644 .github/workflows/release-win.yml diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml new file mode 100644 index 0000000..9985494 --- /dev/null +++ b/.github/workflows/release-linux.yml @@ -0,0 +1,46 @@ +name: Deploy Release (Linux) + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + build: + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + VERSION: ${{ github.ref_name }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Check version + run: | + $TAG = "${{ github.ref_name }}" + echo $TAG + + - name: Set up .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Restore dependencies + run: nuget restore + + - name: Build and make appcast (Linux only) + run: python3 Mirivoice.Desktop/appveyor.py 2>&1 + + + - name: Release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + files: | + MiriVoice-linux-x64.tar.gz + appcast.linux-x64.xml diff --git a/.github/workflows/release-osx.yml b/.github/workflows/release-osx.yml new file mode 100644 index 0000000..880607b --- /dev/null +++ b/.github/workflows/release-osx.yml @@ -0,0 +1,52 @@ +name: Deploy Release (MacOS) + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + build: + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + VERSION: ${{ github.ref_name }} + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + - name: Check version + run: | + $TAG = "${{ github.ref_name }}" + echo $TAG + + - name: Set up .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Restore dependencies + run: nuget restore + + - name: Build and make appcast (Mac only) + run: python3 Mirivoice.Desktop/appveyor.py 2>&1 + + - name: Move File + run: | + $VERSION="${{ github.ref_name }}" + echo $VERSION + mv Mirivoice.Desktop/osxbuild/MiriVoice-osx-x64.zip ./MiriVoice-osx-x64.zip + + + - name: Release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + files: | + MiriVoice-osx-x64.zip + appcast.osx-x64.xml diff --git a/.github/workflows/release-win.yml b/.github/workflows/release-win.yml new file mode 100644 index 0000000..43b6c4e --- /dev/null +++ b/.github/workflows/release-win.yml @@ -0,0 +1,54 @@ +name: Deploy Release (Windows) + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + build: + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + VERSION: ${{ github.ref_name }} + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Check version + run: | + $TAG = "${{ github.ref_name }}" + echo $TAG + + - name: Set up .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Restore dependencies + run: nuget restore + + - name: Build and make appcast (Windows only) + run: python Mirivoice.Desktop/appveyor.py 2>&1 + + - name: Zip + run: | + $VERSION="${{ github.ref_name }}" + echo $VERSION + Compress-Archive -Path Mirivoice.Desktop/bin/win-x86/* -DestinationPath ./MiriVoice-win-x86.zip + Compress-Archive -Path Mirivoice.Desktop/bin/win-x64/* -DestinationPath ./MiriVoice-win-x64.zip + + - name: Release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + files: | + MiriVoice-win-x86.zip + MiriVoice-win-x64.zip + appcast.win-x86.xml + appcast.win-x64.xml diff --git a/Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs b/Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs index 1ae662b..990cdf2 100644 --- a/Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs +++ b/Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs @@ -57,6 +57,7 @@ public bool ClearCacheOnQuit MainManager.Instance.Setting.Save(); } } + /* Not use beta now private bool _useBeta; public bool UseBeta @@ -70,6 +71,7 @@ public bool UseBeta MainManager.Instance.Setting.Save(); } } + */ public GlobalSettingWindowViewModel() { switch (MainManager.Instance.Setting.Langcode) @@ -93,7 +95,7 @@ public GlobalSettingWindowViewModel() { _clearCacheOnQuit = false; } - + /* if (MainManager.Instance.Setting.UseBeta) { _useBeta = true; @@ -102,6 +104,7 @@ public GlobalSettingWindowViewModel() { _useBeta = false; } + */ } } } diff --git a/Mirivoice/Views/GlobalSettingWindow.axaml b/Mirivoice/Views/GlobalSettingWindow.axaml index b975406..6d9144a 100644 --- a/Mirivoice/Views/GlobalSettingWindow.axaml +++ b/Mirivoice/Views/GlobalSettingWindow.axaml @@ -27,10 +27,12 @@ +