Skip to content

Commit

Permalink
v1.0.0 (#1)
Browse files Browse the repository at this point in the history
* Initial version
  • Loading branch information
GillesTourreau authored Feb 19, 2025
1 parent de6a2cb commit 4e42fdd
Show file tree
Hide file tree
Showing 25 changed files with 4,229 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .editorconfig
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
21 changes: 21 additions & 0 deletions .github/workflows/github-actions-ci.yaml
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"
61 changes: 61 additions & 0 deletions .github/workflows/github-actions-release.yaml
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/
Loading

0 comments on commit 4e42fdd

Please sign in to comment.