-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
212 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: DimMon Build Action | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/DimMon.yaml | ||
- DimMon/** | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/DimMon.yaml | ||
- DimMon/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
configuration: [Debug, Release] | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore --arch x64 ./DimMon/DimMon.sln | ||
|
||
- name: Inject build number | ||
shell: pwsh | ||
run: | | ||
$csproj = New-Object System.XML.XMLDocument | ||
$csprojPath = Resolve-Path "./DimMon/DimMon.csproj" | ||
$csproj.Load($csprojPath) | ||
$version = New-Object System.Version $csproj.Project.PropertyGroup.Version | ||
$version = New-Object System.Version @( $version.Major, $version.Minor, ([System.Math]::Max(0, $version.Build)), $env:GITHUB_RUN_NUMBER ) | ||
Write-Host "Version number: $version" | ||
$csproj.Project.PropertyGroup.Version = $version.ToString() | ||
$csproj.Save($csprojPath) | ||
Write-Output "FULL_VERSION_NUMBER=$version" >> $env:GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration ${{ matrix.configuration }} --arch x64 --no-restore ./DimMon/DimMon.csproj | ||
|
||
- name: Publish | ||
if: ${{ matrix.configuration == 'Release' }} | ||
run: dotnet publish --configuration Release -p:PublishProfile=FolderProfile -p:DebugType=None -p:DebugSymbols=false --no-build --no-restore ./DimMon/DimMon.csproj | ||
|
||
- name: Copy Extra Files | ||
if: ${{ matrix.configuration == 'Release' }} | ||
shell: pwsh | ||
run: | | ||
copy .\LICENSE .\DimMon\bin\Publish\ | ||
.\Scripts\makeProjReadme.ps1 DimMon .\DimMon\bin\Publish\README.md | ||
- name: Upload Artifacts | ||
if: ${{ matrix.configuration == 'Release' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: DimMon-${{env.FULL_VERSION_NUMBER}} | ||
path: | | ||
DimMon/bin/publish | ||
!**/*.pdb | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: TestConApp Build Action | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/TestConApp.yaml | ||
- TestConApp/** | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/TestConApp.yaml | ||
- TestConApp/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
configuration: [Debug, Release] | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore ./TestConApp/TestConApp.sln | ||
|
||
- name: Inject build number | ||
shell: pwsh | ||
run: | | ||
$csproj = New-Object System.XML.XMLDocument | ||
$csprojPath = Resolve-Path "./TestConApp/TestConApp.csproj" | ||
$csproj.Load($csprojPath) | ||
$version = New-Object System.Version $csproj.Project.PropertyGroup.Version | ||
$version = New-Object System.Version @( $version.Major, $version.Minor, ([System.Math]::Max(0, $version.Build)), $env:GITHUB_RUN_NUMBER ) | ||
Write-Host "Version number: $version" | ||
$csproj.Project.PropertyGroup.Version = $version.ToString() | ||
$csproj.Save($csprojPath) | ||
Write-Output "FULL_VERSION_NUMBER=$version" >> $env:GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore ./TestConApp/TestConApp.csproj | ||
|
||
- name: Publish | ||
if: ${{ matrix.configuration == 'Release' }} | ||
run: dotnet publish --configuration Release -p:PublishProfile=FolderProfile -p:DebugType=None -p:DebugSymbols=false --no-build --no-restore ./TestConApp/TestConApp.csproj | ||
|
||
- name: Copy Extra Files | ||
if: ${{ matrix.configuration == 'Release' }} | ||
shell: pwsh | ||
run: | | ||
copy .\LICENSE .\TestConApp\bin\Publish\ | ||
.\Scripts\makeProjReadme.ps1 TestConApp .\TestConApp\bin\Publish\README.md | ||
- name: Upload Artifacts | ||
if: ${{ matrix.configuration == 'Release' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: TestConApp-${{env.FULL_VERSION_NUMBER}} | ||
path: | | ||
TestConApp/bin/publish | ||
!**/*.pdb | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Title>DimMon</Title> | ||
<ApplicationIcon>images\sunglasses.ico</ApplicationIcon> | ||
<Version>1.0.0</Version> | ||
<Authors>SGrottel</Authors> | ||
<Description>Dims monitors by transparent black overlaying windows.</Description> | ||
<Copyright>2023, by SGrottel</Copyright> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="images\sunglasses.ico" /> | ||
</ItemGroup> | ||
|
||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net8.0-windows7.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Title>DimMon</Title> | ||
<ApplicationIcon>images\sunglasses.ico</ApplicationIcon> | ||
<Version>1.0.1</Version> | ||
<Authors>SGrottel</Authors> | ||
<Description>Dims monitors by transparent black overlaying windows.</Description> | ||
<Copyright>2023-2024, by SGrottel</Copyright> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="images\sunglasses.ico" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<Configuration>Release</Configuration> | ||
<Platform>Any CPU</Platform> | ||
<PublishDir>bin\publish\</PublishDir> | ||
<PublishProtocol>FileSystem</PublishProtocol> | ||
<_TargetId>Folder</_TargetId> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> | ||
<SelfContained>false</SelfContained> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>false</PublishReadyToRun> | ||
</PropertyGroup> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<Configuration>Release</Configuration> | ||
<Platform>Any CPU</Platform> | ||
<PublishDir>bin\publish\</PublishDir> | ||
<PublishProtocol>FileSystem</PublishProtocol> | ||
<_TargetId>Folder</_TargetId> | ||
<TargetFramework>net8.0-windows7.0</TargetFramework> | ||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> | ||
<SelfContained>false</SelfContained> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>false</PublishReadyToRun> | ||
</PropertyGroup> | ||
</Project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
TestConApp/Properties/PublishProfiles/FolderProfile.pubxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<Configuration>Release</Configuration> | ||
<Platform>Any CPU</Platform> | ||
<PublishDir>bin\publish\</PublishDir> | ||
<PublishProtocol>FileSystem</PublishProtocol> | ||
<_TargetId>Folder</_TargetId> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<SelfContained>false</SelfContained> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Version>1.0.0</Version> | ||
</PropertyGroup> | ||
|
||
</Project> |