Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 24 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]
tags:
- 'v.*.*.*'
- 'v.*.*.*'
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -21,7 +21,7 @@ on:
force_nightly:
description: 'Force this build to create a nightly release'
required: false
default: false
default: 'false'
type: boolean
jobs:

Expand Down Expand Up @@ -82,25 +82,25 @@ jobs:

- name: Build project
run: >
dotnet publish SubathonManager.UI/SubathonManager.UI.csproj
-c Release
-r ${{ env.RUNTIME }}
--self-contained true
-p:PublishSingleFile=true
-p:IncludeAllContentForSelfExtract=true
-p:PublishTrimmed=false
-p:InformationalVersion=${{ steps.vars.outputs.version }}
-o build
dotnet publish SubathonManager.UI/SubathonManager.UI.csproj
-c Release
-r ${{ env.RUNTIME }}
--self-contained true
-p:PublishSingleFile=true
-p:IncludeAllContentForSelfExtract=true
-p:PublishTrimmed=false
-p:InformationalVersion=${{ steps.vars.outputs.version }}
-o build

- name: Copy presets folder and license into build output
run: |
mkdir -Force build\presets
xcopy presets build\presets /E /I /Y
copy LICENSE build\

- name: Upload build artifact (GitHub)
if: ${{ (github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_target == 'github' || github.event.inputs.upload_target == 'default')) ||
((github.ref_type == 'tag' && github.ref != 'refs/tags/nightly') || github.ref_name == 'main') }}
if: ${{ (github.event_name == 'workflow_dispatch' && (github.event.inputs.upload_target == 'github' || github.event.inputs.upload_target == 'default')) ||
((github.ref_type == 'tag' && github.ref != 'refs/tags/nightly') || github.ref_name == 'main') }}
uses: actions/upload-artifact@v4
id: artifact-upload
continue-on-error: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.upload_target == 'github') }}
Expand Down Expand Up @@ -130,8 +130,11 @@ jobs:
name: Create Release
runs-on: ubuntu-latest
needs: build
if: ((github.ref_type == 'tag' && github.ref != 'refs/tags/nightly') || github.ref_name == 'main') || github.event.inputs.force_nightly

if: >
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/tags/nightly')
|| (github.ref_type == 'tag' && github.ref != 'refs/tags/nightly')
|| (github.event_name == 'push' && github.ref == 'refs/heads/main')
|| github.event.inputs.force_nightly == 'true'
steps:
- name: Download build artifact (GitHub)
if: needs.build.outputs.artifact_failed == 'false' && github.event.inputs.upload_target != 'nextcloud'
Expand All @@ -147,17 +150,17 @@ jobs:
curl -L "${{ needs.build.outputs.nextcloud_url }}/download?path=&files=${{ needs.build.outputs.artifact_name }}.zip" \
-o "${{ needs.build.outputs.filename }}"


- name: Zip release files
if: needs.build.outputs.artifact_failed == 'false' && github.event.inputs.upload_target != 'nextcloud'
run: |
cd build
zip -r ../${{ needs.build.outputs.filename }} .
echo "${{ needs.build.outputs.filename }} successfully zipped"


- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/tags/nightly' && !github.event.inputs.force_nightly
if: startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/tags/nightly' && github.event.inputs.force_nightly == 'false'
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
Expand All @@ -167,7 +170,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Delete previous nightly asset
if: github.ref_name == 'main' || github.event.inputs.force_nightly
if: github.ref_name == 'main' || github.event.inputs.force_nightly == 'true'
run: |
release_id=$(gh api repos/${{ github.repository }}/releases/tags/nightly --jq .id)
asset_id=$(gh api repos/${{ github.repository }}/releases/$release_id/assets --jq '.[] | select(.name=="${{ needs.build.outputs.filename }}") | .id')
Expand All @@ -182,7 +185,7 @@ jobs:


- name: Create Nightly Release
if: github.ref_name == 'main' || github.event.inputs.force_nightly
if: github.ref_name == 'main' || github.event.inputs.force_nightly == 'true'
uses: softprops/action-gh-release@v2
with:
name: "Nightly Build"
Expand Down
6 changes: 3 additions & 3 deletions SubathonManager.Data/SubathonManager.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.11">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.11" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Agash.YTLiveChat" Version="3.0.2" />
<PackageReference Include="StreamElementsNET" Version="1.0.0" />
<PackageReference Include="Streamlabs.SocketClient" Version="1.1.1" />
<PackageReference Include="Streamlabs.SocketClient" Version="1.3.0" />
<PackageReference Include="TwitchLib.Api" Version="3.9.0" />
<PackageReference Include="TwitchLib.Client" Version="3.4.0" />
<PackageReference Include="TwitchLib.Communication" Version="1.0.6" />
Expand Down
35 changes: 18 additions & 17 deletions SubathonManager.UI/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<Border Grid.Row="1" Background="#1c1c1c" Height="36" VerticalAlignment="Top"/>
<TabControl Grid.Row="1" Background="Transparent">
<!-- Home Tab -->
<TabItem Header="Home" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e">
<TabItem Header="Home" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e" Width="140">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="500"/>
Expand Down Expand Up @@ -254,7 +254,7 @@
</TabItem>

<!-- Overlays Tab -->
<TabItem Header="Overlays" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e">
<TabItem Header="Overlays" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e" Width="140">
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
Expand All @@ -266,20 +266,21 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,10">
<TextBlock Text="Overlays"
FontWeight="Bold"
<DockPanel Margin="6,0,2,10">
<ui:Button DockPanel.Dock="Right"
Icon="Add24"
Foreground="White"
Appearance="Secondary"
Content="Create New"
Width="130"
Padding="2"
Click="AddRoute_Click" />

<TextBlock Text="Overlays"
FontWeight="Bold"
FontSize="18"
VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="4,0,0,0">
<ui:Button Icon="Add24" Foreground="White"
Appearance="Primary"
Content="Create New"
Width="130" Padding="2"
Click="AddRoute_Click"
Margin="10,0,0,0"></ui:Button>
</StackPanel>
</StackPanel>
VerticalAlignment="Center" />
</DockPanel>

<!-- Routes List -->
<ScrollViewer Grid.Column="0" Grid.Row="1" VerticalScrollBarVisibility="Auto">
Expand Down Expand Up @@ -368,12 +369,12 @@
</TabItem>

<!-- Goals Tab -->
<TabItem Header="Goals" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e">
<TabItem Header="Goals" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e" Width="140">
<views:GoalsEditor/>
</TabItem>

<!-- Settings Tab -->
<TabItem Header="Settings" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e">
<TabItem Header="Settings" BorderBrush="#303030" BorderThickness="2" Background="#1e1e1e" Width="140">
<views:SettingsView/>
</TabItem>
</TabControl>
Expand Down
4 changes: 2 additions & 2 deletions SubathonManager.UI/SubathonManager.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.10" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50" />
<PackageReference Include="WPF-UI" Version="4.0.3" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3595.46" />
<PackageReference Include="WPF-UI" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading