Skip to content

Commit

Permalink
Split deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
EX3exp committed Oct 6, 2024
1 parent 80450dc commit 6b2d99f
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions .github/workflows/release-osx.yml
Original file line number Diff line number Diff line change
@@ -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
54 changes: 54 additions & 0 deletions .github/workflows/release-win.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion Mirivoice/ViewModels/GlobalSettingWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public bool ClearCacheOnQuit
MainManager.Instance.Setting.Save();
}
}
/* Not use beta now
private bool _useBeta;
public bool UseBeta
Expand All @@ -70,6 +71,7 @@ public bool UseBeta
MainManager.Instance.Setting.Save();
}
}
*/
public GlobalSettingWindowViewModel()
{
switch (MainManager.Instance.Setting.Langcode)
Expand All @@ -93,7 +95,7 @@ public GlobalSettingWindowViewModel()
{
_clearCacheOnQuit = false;
}

/*
if (MainManager.Instance.Setting.UseBeta)
{
_useBeta = true;
Expand All @@ -102,6 +104,7 @@ public GlobalSettingWindowViewModel()
{
_useBeta = false;
}
*/
}
}
}
2 changes: 2 additions & 0 deletions Mirivoice/Views/GlobalSettingWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
<TextBlock Text="{DynamicResource gprefs.clearcacheonquit} " Foreground="DarkSlateGray" FontWeight="Bold" FontSize="15" Margin="13 15 15 15" />
<ToggleSwitch IsChecked="{Binding ClearCacheOnQuit}" FontSize="15" Margin="0 10 10 10" Foreground="BlueViolet" Cursor="Hand"/>
</StackPanel>
<!--
<StackPanel Orientation="Horizontal" Margin="0 10 10 10">
<TextBlock Text="{DynamicResource gprefs.usebeta} " Foreground="DarkSlateGray" FontWeight="Bold" FontSize="15" Margin="13 15 15 15" />
<ToggleSwitch IsChecked="{Binding UseBeta}" FontSize="15" Margin="0 10 10 10" Foreground="BlueViolet" Cursor="Hand"/>
</StackPanel>
-->
</StackPanel>

</ScrollViewer>
Expand Down

0 comments on commit 6b2d99f

Please sign in to comment.