-
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.
Showing
25 changed files
with
4,229 additions
and
1 deletion.
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,16 @@ | ||
[*.yaml] | ||
indent_size = 2 | ||
tab_width = 2 | ||
|
||
[*.cs] | ||
|
||
# StyleCop | ||
|
||
# SA1600: Elements should be documented | ||
dotnet_diagnostic.SA1600.severity = none | ||
|
||
# SA1601: Partial elements should be documented | ||
dotnet_diagnostic.SA1601.severity = none | ||
|
||
# SA1602: Enumeration items should be documented | ||
dotnet_diagnostic.SA1602.severity = none |
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,21 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
push: | ||
branches: [ "releases/**" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 8.x | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Build | ||
run: dotnet build --property:Configuration=Debug "PosInformatique.Pdf.PasswordRemover.sln" |
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,61 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
VersionPrefix: | ||
type: string | ||
description: The version of the library | ||
required: true | ||
default: 0.9.0 | ||
VersionSuffix: | ||
type: string | ||
description: The version suffix of the library (for example rc.1) | ||
|
||
run-name: ${{ inputs.VersionPrefix }}${{ inputs.VersionSuffix && '-' || '' }}${{ inputs.VersionSuffix }} | ||
|
||
jobs: | ||
build: | ||
env: | ||
SETUP_PROJECT_FILE: "./src/Pdf.PasswordRemover.WinForms.Setup/Pdf.PasswordRemover.WinForms.Setup.vdproj" | ||
VERSION: ${{ inputs.VersionPrefix }}${{ inputs.VersionSuffix && '-' || '' }}${{ inputs.VersionSuffix }} | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET 8.x SDK | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Build executable application | ||
run: dotnet build --property:Configuration=Release --property:AssemblyVersion=${{ inputs.VersionPrefix }} --property:FileVersion=${{ inputs.VersionPrefix }} --property:InformationalVersion=${{ env.VERSION }} "./src/Pdf.PasswordRemover.WinForms/Pdf.PasswordRemover.WinForms.csproj" | ||
|
||
- name: Setup Visual Studio environment | ||
uses: seanmiddleditch/gha-setup-vsdevenv@v4 | ||
|
||
- name: Update the .vdproj file | ||
shell: pwsh | ||
run: | | ||
$newProductCode = [System.Guid]::NewGuid().ToString("B").ToUpper() | ||
$content = Get-Content -Path $env:SETUP_PROJECT_FILE -Raw | ||
$content = $content -replace '"ProductVersion" = "8:.*?"', '"ProductVersion" = "8:${{ inputs.VersionPrefix }}"' | ||
$content = $content -replace '"OutputFilename" = "8:Release\\\\PdfPasswordRemover.msi"', '"OutputFilename" = "8:Release\\PdfPasswordRemover_${{ env.VERSION }}.msi"' | ||
$content = $content -replace '"ProductCode" = "8:{CB215E38-E864-48E0-851B-6B2B67958B42}"', ('"ProductCode" = "8:' + $newProductCode + '"') | ||
Set-Content -Path $env:SETUP_PROJECT_FILE -Value $content | ||
Write-Host "Version updated to '${{ inputs.VersionPrefix }}' in '$env:SETUP_PROJECT_FILE'" | ||
Write-Host "OutputFilename property updated to 'Release\\PdfPasswordRemover_${{ env.VERSION }}.msi' in '$env:SETUP_PROJECT_FILE'" | ||
Write-Host "ProductCode property updated to '$newProductCode' in '$env:SETUP_PROJECT_FILE'" | ||
- name: Build MSI package | ||
run: devenv "${{ env.SETUP_PROJECT_FILE }}" /Build "Release" | ||
|
||
- name: Upload MSI package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: installer | ||
path: | | ||
./src/Pdf.PasswordRemover.WinForms.Setup/Release/ |
Oops, something went wrong.