Skip to content

Commit f7c5c88

Browse files
Merge pull request #2 from OpenCommissioning/development
Development
2 parents 6e9cff7 + 25a6520 commit f7c5c88

5 files changed

Lines changed: 50 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-latest
9+
runs-on: windows-latest
1010

1111
steps:
1212
- name: Checkout
@@ -34,11 +34,17 @@ jobs:
3434

3535
- name: Get current version
3636
if: steps.versionize.outcome == 'success'
37-
run: echo "VERSION=v$(versionize inspect)" >> $GITHUB_ENV
37+
run: |
38+
$version = versionize inspect
39+
echo "VERSION=v$version" >> $env:GITHUB_ENV
40+
shell: pwsh
3841

3942
- name: Get current changelog
4043
if: steps.versionize.outcome == 'success'
41-
run: echo "$(versionize changelog)" > latest_changelog.md
44+
run: |
45+
$changelog = versionize changelog
46+
Set-Content -Path latest_changelog.md -Value $changelog
47+
shell: pwsh
4248

4349
- name: Push changes to GitHub
4450
if: steps.versionize.outcome == 'success'
@@ -53,20 +59,40 @@ jobs:
5359
run: |
5460
dotnet build OC.OfficeLite --configuration release --output ./Publish
5561
dotnet build OC.OfficeLiteServer --configuration release --output ./Publish
62+
63+
- name: Install AzureSignTool
64+
run: dotnet tool install --global azuresigntool
65+
66+
- name: Sign executable
67+
if: steps.versionize.outcome == 'success'
68+
run: |
69+
azuresigntool sign `
70+
-kvu ${{secrets.AZURE_KEY_VAULT}} `
71+
-kvc ${{secrets.AZURE_CERT_NAME}} `
72+
-kvt ${{secrets.AZURE_TENANT_ID}} `
73+
-kvi ${{secrets.AZURE_CLIENT_ID}} `
74+
-kvs ${{secrets.AZURE_CLIENT_SECRET}} `
75+
-tr http://timestamp.globalsign.com/tsa/advanced `
76+
-td sha256 `
77+
./Publish/OC.OfficeLite.dll `
78+
./Publish/OC.OfficeLiteServer.exe
79+
80+
- name: Zip signed artifacts
81+
if: steps.versionize.outcome == 'success'
82+
run: |
83+
mkdir OC.OfficeLite
84+
mv OC.OfficeLite.dll OC.OfficeLite/
85+
mv Config.plugin OC.OfficeLite/
86+
Compress-Archive -Path OC.OfficeLite -DestinationPath OC.OfficeLite_${{env.VERSION}}.zip
87+
Compress-Archive -Path OC.OfficeLiteServer.exe -DestinationPath OC.OfficeLiteServer_${{env.VERSION}}.zip
88+
shell: pwsh
89+
working-directory: Publish
5690

5791
- name: Publish new release
5892
if: steps.versionize.outcome == 'success'
5993
env:
6094
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6195
run: |
6296
gh release create ${{env.VERSION}} -t "Release ${{env.VERSION}}" -F latest_changelog.md
63-
cd ./Publish
64-
mkdir OC.OfficeLite
65-
mv OC.OfficeLite.dll OC.OfficeLite/
66-
mv Config.plugin OC.OfficeLite/
67-
zip -r OC.OfficeLite_${{env.VERSION}}.zip OC.OfficeLite
68-
gh release upload ${{env.VERSION}} OC.OfficeLite_${{env.VERSION}}.zip
69-
mkdir OC.OfficeLiteServer
70-
mv OC.OfficeLiteServer.exe OC.OfficeLiteServer/
71-
zip -r OC.OfficeLiteServer_${{env.VERSION}}.zip OC.OfficeLiteServer
72-
gh release upload ${{env.VERSION}} OC.OfficeLiteServer_${{env.VERSION}}.zip
97+
gh release upload ${{env.VERSION}} ./Publish/OC.OfficeLite_${{env.VERSION}}.zip
98+
gh release upload ${{env.VERSION}} ./Publish/OC.OfficeLiteServer_${{env.VERSION}}.zip

OC.OfficeLite/OC.OfficeLite.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="OC.Assistant.Sdk" Version="1.6.1" />
18+
<PackageReference Include="OC.Assistant.Sdk" Version="1.7.1" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

OC.OfficeLiteServer/MainWindow.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
<theme:Window.TitleBarContent>
1616
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
1717
<Button
18-
FontFamily="{DynamicResource SymbolThemeFontFamily}"
1918
FontSize="14"
2019
ToolTip="Settings"
21-
Content="&#xE712;"
22-
Click="SettingsOnClick"/>
20+
Click="SettingsOnClick">
21+
<ContentControl
22+
Margin="0 -3 2 3"
23+
Template="{DynamicResource IconTemplate}"
24+
Content="{DynamicResource IconMore}"/>
25+
</Button>
2326
<Border Width="1" Background="{DynamicResource White4Brush}" Margin="6 8 0 8"/>
2427
</StackPanel>
2528
</theme:Window.TitleBarContent>
26-
<theme:LogViewer x:Name="LogViewer" Background="Transparent"/>
29+
<theme:LogViewer x:Name="LogViewer"/>
2730
</theme:Window>

OC.OfficeLiteServer/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ private async void SettingsOnClick(object sender, RoutedEventArgs e)
3333
try
3434
{
3535
var settings = new SettingsView();
36-
var result = await Modal.Show("Settings", settings, MessageBoxButton.OKCancel, MessageBoxImage.None);
36+
var result = await Assistant.Theme.MessageBox
37+
.Show("Settings", settings, MessageBoxButton.OKCancel, MessageBoxImage.None);
3738
if (result != MessageBoxResult.OK || !settings.Apply()) return;
3839

3940
Logger.LogInfo(this, "Restarting server...");

OC.OfficeLiteServer/OC.OfficeLiteServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<PrivateAssets>all</PrivateAssets>
3030
</PackageReference>
3131
<PackageReference Include="OC.Assistant.Sdk" Version="1.7.1" />
32-
<PackageReference Include="OC.Assistant.Theme" Version="2.0.1" />
32+
<PackageReference Include="OC.Assistant.Theme" Version="2.1.0" />
3333
<PackageReference Include="System.Text.Json" Version="9.0.5" />
3434
</ItemGroup>
3535

0 commit comments

Comments
 (0)