From d7d71200eeac13ea89dfdaa3e83324abde75ef74 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:18:14 -0800 Subject: [PATCH 01/43] Set file versions in release workflow --- .github/workflows/dotnet.yml | 24 +++++++++++++++++++ CoseHandler/CoseHandler.csproj | 3 +++ .../CoseIndirectSignature.csproj | 3 +++ .../CoseSign1.Abstractions.csproj | 3 +++ .../CoseSign1.Certificates.csproj | 3 +++ CoseSign1.Headers/CoseSign1.Headers.csproj | 3 +++ CoseSign1/CoseSign1.csproj | 3 +++ CoseSignTool/CoseSignTool.csproj | 3 +++ 8 files changed, 45 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 61af0918..4d5bbfeb 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -270,6 +270,30 @@ jobs: - name: Checkout code again uses: actions/checkout@v3 + # Update file versions. + - name: Update file versions + run: | + # Define the new version number + $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] + + # Get all .csproj files in the solution directory and its subdirectories + $csprojFiles = Get-ChildItem -Path "C:\Path\To\Your\Solution" -Recurse -Filter "*.csproj" + | Where-Object { $_.Name -notmatch "test" } + + foreach ($file in $csprojFiles) { + # Read the content of the .csproj file + $content = Get-Content -Path $file.FullName + + # Update the version number in the .csproj file + $updatedContent = $content -replace '.*?', "$newVersion" + + # Write the updated content back to the .csproj file + Set-Content -Path $file.FullName -Value $updatedContent + + Write-Host "Updated version in $($file.FullName)" + } + shell: pwsh + # Build and publish the binaries to ./published. - name: Publish outputs run: | diff --git a/CoseHandler/CoseHandler.csproj b/CoseHandler/CoseHandler.csproj index c56b6f4c..0f852f91 100644 --- a/CoseHandler/CoseHandler.csproj +++ b/CoseHandler/CoseHandler.csproj @@ -4,6 +4,9 @@ netstandard2.0 latest + + + 1.0.0 diff --git a/CoseIndirectSignature/CoseIndirectSignature.csproj b/CoseIndirectSignature/CoseIndirectSignature.csproj index d5efd728..cc8a0a63 100644 --- a/CoseIndirectSignature/CoseIndirectSignature.csproj +++ b/CoseIndirectSignature/CoseIndirectSignature.csproj @@ -4,6 +4,9 @@ netstandard2.0 latest + + + 1.0.0 diff --git a/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj b/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj index 1dd43543..9c98d16a 100644 --- a/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj +++ b/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj @@ -4,6 +4,9 @@ netstandard2.0 latest + + + 1.0.0 diff --git a/CoseSign1.Certificates/CoseSign1.Certificates.csproj b/CoseSign1.Certificates/CoseSign1.Certificates.csproj index 49594fba..87377a70 100644 --- a/CoseSign1.Certificates/CoseSign1.Certificates.csproj +++ b/CoseSign1.Certificates/CoseSign1.Certificates.csproj @@ -4,6 +4,9 @@ netstandard2;net8.0 latest + + + 1.0.0 diff --git a/CoseSign1.Headers/CoseSign1.Headers.csproj b/CoseSign1.Headers/CoseSign1.Headers.csproj index a88c0124..3c74d01c 100644 --- a/CoseSign1.Headers/CoseSign1.Headers.csproj +++ b/CoseSign1.Headers/CoseSign1.Headers.csproj @@ -4,6 +4,9 @@ netstandard2.0 latest + + + 1.0.0 diff --git a/CoseSign1/CoseSign1.csproj b/CoseSign1/CoseSign1.csproj index 944f7bc6..240f4363 100644 --- a/CoseSign1/CoseSign1.csproj +++ b/CoseSign1/CoseSign1.csproj @@ -4,6 +4,9 @@ netstandard2.0 latest + + + 1.0.0 diff --git a/CoseSignTool/CoseSignTool.csproj b/CoseSignTool/CoseSignTool.csproj index 1a41a6ff..6488cbe5 100644 --- a/CoseSignTool/CoseSignTool.csproj +++ b/CoseSignTool/CoseSignTool.csproj @@ -5,6 +5,9 @@ net8.0 win-x64;linux-x64;osx-arm64 AnyCPU + + + 1.0.0 From 3dd2c35299b1fdf550089ad38715be836e346a08 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 14 Nov 2024 22:25:49 +0000 Subject: [PATCH 02/43] Update changelog for release --- CHANGELOG.md | 100 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f95ac3e1..06087055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [v1.2.8-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre7) (2024-10-30) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.3.0...v1.2.8-pre7) + +**Closed issues:** + +- Revocation and Root Trust [\#119](https://github.com/microsoft/CoseSignTool/issues/119) + +**Merged pull requests:** + +- Adds CLI install instructions [\#116](https://github.com/microsoft/CoseSignTool/pull/116) ([ivarprudnikov](https://github.com/ivarprudnikov)) + +## [v1.3.0](https://github.com/microsoft/CoseSignTool/tree/v1.3.0) (2024-10-30) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre6...v1.3.0) + +## [v1.2.8-pre6](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre6) (2024-10-30) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre5...v1.2.8-pre6) + +**Merged pull requests:** + +- .NET 8 Revocation and Root Trust Bugfix [\#118](https://github.com/microsoft/CoseSignTool/pull/118) ([elantiguamsft](https://github.com/elantiguamsft)) + ## [v1.2.8-pre5](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre5) (2024-10-21) [Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre4...v1.2.8-pre5) @@ -18,19 +42,19 @@ ## [v1.2.8-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre3) (2024-10-15) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre2...v1.2.8-pre3) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre1...v1.2.8-pre3) **Merged pull requests:** - Increase timeout for checking for empty streams [\#113](https://github.com/microsoft/CoseSignTool/pull/113) ([lemccomb](https://github.com/lemccomb)) -## [v1.2.8-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre2) (2024-09-25) +## [v1.2.8-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre1) (2024-09-25) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre1...v1.2.8-pre2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre2...v1.2.8-pre1) -## [v1.2.8-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre1) (2024-09-25) +## [v1.2.8-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre2) (2024-09-25) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8...v1.2.8-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8...v1.2.8-pre2) **Merged pull requests:** @@ -196,19 +220,19 @@ ## [v1.2.1-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.1-pre1) (2024-03-12) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1...v1.2.1-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0-pre1...v1.2.1-pre1) **Merged pull requests:** - Revert "Add .exe to CoseSignTool NuGet" [\#83](https://github.com/microsoft/CoseSignTool/pull/83) ([elantiguamsft](https://github.com/elantiguamsft)) -## [v1.2.1](https://github.com/microsoft/CoseSignTool/tree/v1.2.1) (2024-03-07) +## [v1.2.0-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.0-pre1) (2024-03-07) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0-pre1...v1.2.1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1...v1.2.0-pre1) -## [v1.2.0-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.0-pre1) (2024-03-07) +## [v1.2.1](https://github.com/microsoft/CoseSignTool/tree/v1.2.1) (2024-03-07) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.exeTest...v1.2.0-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.exeTest...v1.2.1) **Merged pull requests:** @@ -216,27 +240,27 @@ ## [v1.2.exeTest](https://github.com/microsoft/CoseSignTool/tree/v1.2.exeTest) (2024-03-06) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0...v1.2.exeTest) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8-pre1...v1.2.exeTest) -## [v1.2.0](https://github.com/microsoft/CoseSignTool/tree/v1.2.0) (2024-03-04) +## [v1.1.8-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.8-pre1) (2024-03-04) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8-pre1...v1.2.0) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0...v1.1.8-pre1) -## [v1.1.8-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.8-pre1) (2024-03-04) +## [v1.2.0](https://github.com/microsoft/CoseSignTool/tree/v1.2.0) (2024-03-04) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7-pre3...v1.1.8-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8...v1.2.0) **Merged pull requests:** - Update Nuspec for CoseIndirectSignature [\#80](https://github.com/microsoft/CoseSignTool/pull/80) ([elantiguamsft](https://github.com/elantiguamsft)) -## [v1.1.7-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.1.7-pre3) (2024-03-02) +## [v1.1.8](https://github.com/microsoft/CoseSignTool/tree/v1.1.8) (2024-03-02) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8...v1.1.7-pre3) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7-pre3...v1.1.8) -## [v1.1.8](https://github.com/microsoft/CoseSignTool/tree/v1.1.8) (2024-03-02) +## [v1.1.7-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.1.7-pre3) (2024-03-02) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7-pre2...v1.1.8) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7-pre2...v1.1.7-pre3) **Merged pull requests:** @@ -308,19 +332,19 @@ ## [v1.1.3](https://github.com/microsoft/CoseSignTool/tree/v1.1.3) (2024-01-24) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.2...v1.1.3) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1-pre2...v1.1.3) **Merged pull requests:** - Updating snk for internal package compatibility [\#72](https://github.com/microsoft/CoseSignTool/pull/72) ([elantiguamsft](https://github.com/elantiguamsft)) -## [v1.1.2](https://github.com/microsoft/CoseSignTool/tree/v1.1.2) (2024-01-18) +## [v1.1.1-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.1.1-pre2) (2024-01-18) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1-pre2...v1.1.2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.2...v1.1.1-pre2) -## [v1.1.1-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.1.1-pre2) (2024-01-18) +## [v1.1.2](https://github.com/microsoft/CoseSignTool/tree/v1.1.2) (2024-01-18) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1-pre1...v1.1.1-pre2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1-pre1...v1.1.2) **Merged pull requests:** @@ -328,19 +352,19 @@ ## [v1.1.1-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.1-pre1) (2024-01-17) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre7...v1.1.1-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1...v1.1.1-pre1) **Merged pull requests:** - Move CreateChangelog to after build in PR build [\#70](https://github.com/microsoft/CoseSignTool/pull/70) ([lemccomb](https://github.com/lemccomb)) -## [v1.1.0-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.1.0-pre7) (2024-01-12) +## [v1.1.1](https://github.com/microsoft/CoseSignTool/tree/v1.1.1) (2024-01-12) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1...v1.1.0-pre7) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre7...v1.1.1) -## [v1.1.1](https://github.com/microsoft/CoseSignTool/tree/v1.1.1) (2024-01-12) +## [v1.1.0-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.1.0-pre7) (2024-01-12) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre6...v1.1.1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre6...v1.1.0-pre7) **Closed issues:** @@ -397,7 +421,7 @@ ## [v1.1.0-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.0-pre1) (2023-11-03) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.10...v1.1.0-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0...v1.1.0-pre1) **Merged pull requests:** @@ -407,13 +431,13 @@ - DetachedSignatureFactory accepts pre-hashed content as payload [\#53](https://github.com/microsoft/CoseSignTool/pull/53) ([elantiguamsft](https://github.com/elantiguamsft)) - Add password support for certificate files [\#52](https://github.com/microsoft/CoseSignTool/pull/52) ([lemccomb](https://github.com/lemccomb)) -## [v0.3.1-pre.10](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.10) (2023-10-10) +## [v1.1.0](https://github.com/microsoft/CoseSignTool/tree/v1.1.0) (2023-10-10) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0...v0.3.1-pre.10) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.10...v1.1.0) -## [v1.1.0](https://github.com/microsoft/CoseSignTool/tree/v1.1.0) (2023-10-10) +## [v0.3.1-pre.10](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.10) (2023-10-10) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.9...v1.1.0) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.2...v0.3.1-pre.10) **Merged pull requests:** @@ -423,13 +447,13 @@ - Port changes from ADO repo to GitHub repo [\#46](https://github.com/microsoft/CoseSignTool/pull/46) ([lemccomb](https://github.com/lemccomb)) - Re-enable CodeQL [\#45](https://github.com/microsoft/CoseSignTool/pull/45) ([lemccomb](https://github.com/lemccomb)) -## [v0.3.1-pre.9](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.9) (2023-09-28) +## [v0.3.2](https://github.com/microsoft/CoseSignTool/tree/v0.3.2) (2023-09-28) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.2...v0.3.1-pre.9) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.9...v0.3.2) -## [v0.3.2](https://github.com/microsoft/CoseSignTool/tree/v0.3.2) (2023-09-28) +## [v0.3.1-pre.9](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.9) (2023-09-28) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.8...v0.3.2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.8...v0.3.1-pre.9) **Merged pull requests:** From 6e4ea802626b4a1ad7ba50a9f889cfb275dbfb98 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:34:47 -0800 Subject: [PATCH 03/43] make the function testable from PR --- .github/workflows/dotnet.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4d5bbfeb..cc1186bd 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -238,7 +238,7 @@ jobs: # automatic release creation does not trigger the release event. release_assets: name: release-assets - if: ${{ github.event_name == 'release' || github.event_name == 'push'}} + # if: ${{ github.event_name == 'release' || github.event_name == 'push'}} needs: [ create_release ] runs-on: ${{ matrix.os }} permissions: @@ -274,7 +274,7 @@ jobs: - name: Update file versions run: | # Define the new version number - $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] + $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] -or "0.0.0-test1" # get rid of the "-or" part when the release is created. # Get all .csproj files in the solution directory and its subdirectories $csprojFiles = Get-ChildItem -Path "C:\Path\To\Your\Solution" -Recurse -Filter "*.csproj" @@ -291,6 +291,7 @@ jobs: Set-Content -Path $file.FullName -Value $updatedContent Write-Host "Updated version in $($file.FullName)" + exit 1 # Remove this line when the script is ready. } shell: pwsh From 48e9346bb82b7489f5e0315ea8243030ac2aed4d Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:37:10 -0800 Subject: [PATCH 04/43] don't wait for create_release --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cc1186bd..55ab2db0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -239,7 +239,7 @@ jobs: release_assets: name: release-assets # if: ${{ github.event_name == 'release' || github.event_name == 'push'}} - needs: [ create_release ] + # needs: [ create_release ] runs-on: ${{ matrix.os }} permissions: actions: write From 184435f1c7c5d047ab9340ce3232c74cde30cef0 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:45:27 -0800 Subject: [PATCH 05/43] fix path to proj files --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 55ab2db0..be59d0c0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -276,8 +276,8 @@ jobs: # Define the new version number $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] -or "0.0.0-test1" # get rid of the "-or" part when the release is created. - # Get all .csproj files in the solution directory and its subdirectories - $csprojFiles = Get-ChildItem -Path "C:\Path\To\Your\Solution" -Recurse -Filter "*.csproj" + # Get all non-test .csproj files in the solution directory and its subdirectories + $csprojFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -Filter "*.csproj" | Where-Object { $_.Name -notmatch "test" } foreach ($file in $csprojFiles) { From 62a1fb0dd27315eed2ecbda3996fc8b109e18e4e Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:48:34 -0800 Subject: [PATCH 06/43] move the exit point so I can see outputs --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index be59d0c0..925d0940 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -291,13 +291,13 @@ jobs: Set-Content -Path $file.FullName -Value $updatedContent Write-Host "Updated version in $($file.FullName)" - exit 1 # Remove this line when the script is ready. } shell: pwsh # Build and publish the binaries to ./published. - name: Publish outputs run: | + exit 1 # Remove this line when the script is ready. dotnet publish --configuration Debug --self-contained true --output published/debug CoseSignTool/CoseSignTool.csproj dotnet publish --configuration Release --self-contained true --output published/release CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. From 98a0750f16d1f844c87560b94876afb627410095 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:51:36 -0800 Subject: [PATCH 07/43] allow publish --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 925d0940..abf060c6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -297,7 +297,7 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - exit 1 # Remove this line when the script is ready. + #exit 1 # Remove this line when the script is ready. dotnet publish --configuration Debug --self-contained true --output published/debug CoseSignTool/CoseSignTool.csproj dotnet publish --configuration Release --self-contained true --output published/release CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. From 02457614e7e33d740e4f793bf82638f1109c99b9 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 14 Nov 2024 22:56:57 +0000 Subject: [PATCH 08/43] Update changelog for release --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06087055..5114b428 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [v0.0.0-Test1](https://github.com/microsoft/CoseSignTool/tree/v0.0.0-Test1) (2024-10-30) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.8-pre7...v0.0.0-Test1) + ## [v1.2.8-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.2.8-pre7) (2024-10-30) [Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.3.0...v1.2.8-pre7) From d8c928934fe74a823ac95093e97e1f4b199df1c9 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 14:58:58 -0800 Subject: [PATCH 09/43] verify file write in code --- .github/workflows/dotnet.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index abf060c6..31e45bc6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -290,6 +290,9 @@ jobs: # Write the updated content back to the .csproj file Set-Content -Path $file.FullName -Value $updatedContent + # Make sure the version number was updated + Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion" + Write-Host "Updated version in $($file.FullName)" } shell: pwsh @@ -297,7 +300,7 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - #exit 1 # Remove this line when the script is ready. + exit 1 # Remove this line when the script is ready. dotnet publish --configuration Debug --self-contained true --output published/debug CoseSignTool/CoseSignTool.csproj dotnet publish --configuration Release --self-contained true --output published/release CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. From 999b07b32202a2a7376b021b9a88484b13e46d7b Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 15:03:02 -0800 Subject: [PATCH 10/43] clarity of result --- .github/workflows/dotnet.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 31e45bc6..82041a5c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -291,9 +291,11 @@ jobs: Set-Content -Path $file.FullName -Value $updatedContent # Make sure the version number was updated - Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion" - - Write-Host "Updated version in $($file.FullName)" + if (Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion") { + Write-Host "Updated version in $($file.FullName)" + } else { + Write-Host "Failed to update version in $($file.FullName)" + } } shell: pwsh From 092c4c082183b196b6e79329f47dcf8139eecab9 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Thu, 14 Nov 2024 15:05:37 -0800 Subject: [PATCH 11/43] production ready --- .github/workflows/dotnet.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 82041a5c..c0ffd4b3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -238,8 +238,8 @@ jobs: # automatic release creation does not trigger the release event. release_assets: name: release-assets - # if: ${{ github.event_name == 'release' || github.event_name == 'push'}} - # needs: [ create_release ] + if: ${{ github.event_name == 'release' || github.event_name == 'push'}} + needs: [ create_release ] runs-on: ${{ matrix.os }} permissions: actions: write @@ -274,7 +274,7 @@ jobs: - name: Update file versions run: | # Define the new version number - $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] -or "0.0.0-test1" # get rid of the "-or" part when the release is created. + $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] # Get all non-test .csproj files in the solution directory and its subdirectories $csprojFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -Filter "*.csproj" @@ -302,7 +302,6 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - exit 1 # Remove this line when the script is ready. dotnet publish --configuration Debug --self-contained true --output published/debug CoseSignTool/CoseSignTool.csproj dotnet publish --configuration Release --self-contained true --output published/release CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. From 961872b12c6500b8c425c937e533d6680e9d2c0f Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:20:22 -0800 Subject: [PATCH 12/43] try using -p: to set version --- .github/workflows/dotnet.yml | 69 ++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c0ffd4b3..e82089ca 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,7 +50,8 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | - dotnet build --configuration Debug CoseSignTool.sln + VERSION=$(git tag | sort --version-sort | tail -n1) + dotnet build --configuration Debug -p:FileVersion=VERSION CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj @@ -62,6 +63,13 @@ jobs: - name: List working directory run: ${{ matrix.dir_command }} + # Print the version number of CoseSignTool.exe + - name: Print version number + shell: pwsh + run: | + $version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("CoseSignTool/bin/Debug/net8.0/CoseSignTool.exe").FileVersion + Write-Output "CoseSignTool version is $version" + # Create a changelog that includes all the PRs merged since the last release. # If it's not a pull request, skip to the build job. create_changelog: @@ -271,39 +279,40 @@ jobs: uses: actions/checkout@v3 # Update file versions. - - name: Update file versions - run: | - # Define the new version number - $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] - - # Get all non-test .csproj files in the solution directory and its subdirectories - $csprojFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -Filter "*.csproj" - | Where-Object { $_.Name -notmatch "test" } - - foreach ($file in $csprojFiles) { - # Read the content of the .csproj file - $content = Get-Content -Path $file.FullName - - # Update the version number in the .csproj file - $updatedContent = $content -replace '.*?', "$newVersion" - - # Write the updated content back to the .csproj file - Set-Content -Path $file.FullName -Value $updatedContent - - # Make sure the version number was updated - if (Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion") { - Write-Host "Updated version in $($file.FullName)" - } else { - Write-Host "Failed to update version in $($file.FullName)" - } - } - shell: pwsh + # - name: Update file versions + # run: | + # # Define the new version number + # $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] + + # # Get all non-test .csproj files in the solution directory and its subdirectories + # $csprojFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -Filter "*.csproj" + # | Where-Object { $_.Name -notmatch "test" } + + # foreach ($file in $csprojFiles) { + # # Read the content of the .csproj file + # $content = Get-Content -Path $file.FullName + + # # Update the version number in the .csproj file + # $updatedContent = $content -replace '.*?', "$newVersion" + + # # Write the updated content back to the .csproj file + # Set-Content -Path $file.FullName -Value $updatedContent + + # # Make sure the version number was updated + # if (Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion") { + # Write-Host "Updated version in $($file.FullName)" + # } else { + # Write-Host "Failed to update version in $($file.FullName)" + # } + # } + # shell: pwsh # Build and publish the binaries to ./published. - name: Publish outputs run: | - dotnet publish --configuration Debug --self-contained true --output published/debug CoseSignTool/CoseSignTool.csproj - dotnet publish --configuration Release --self-contained true --output published/release CoseSignTool/CoseSignTool.csproj + VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] + dotnet publish --configuration Debug --self-contained true --output published/debug -p:FileVersion=VERSION CoseSignTool/CoseSignTool.csproj + dotnet publish --configuration Release --self-contained true --output published/release -p:FileVersion=VERSION CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. # Copy the docs, license, and markdown files to the release folders. From ed2cfc8d084c67dabc88af22ae397db85e40a6b7 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:25:51 -0800 Subject: [PATCH 13/43] $VERSION --- .github/workflows/dotnet.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e82089ca..683009bb 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,8 +50,8 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | - VERSION=$(git tag | sort --version-sort | tail -n1) - dotnet build --configuration Debug -p:FileVersion=VERSION CoseSignTool.sln + $VERSION=$(git tag | sort --version-sort | tail -n1) + dotnet build --configuration Debug -p:FileVersion=$VERSION CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj @@ -310,9 +310,9 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] - dotnet publish --configuration Debug --self-contained true --output published/debug -p:FileVersion=VERSION CoseSignTool/CoseSignTool.csproj - dotnet publish --configuration Release --self-contained true --output published/release -p:FileVersion=VERSION CoseSignTool/CoseSignTool.csproj + $VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] + dotnet publish --configuration Debug --self-contained true --output published/debug -p:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj + dotnet publish --configuration Release --self-contained true --output published/release -p:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. # Copy the docs, license, and markdown files to the release folders. From 45541cd4dd2fe0b452ef1a5fd0985b9140d6e03e Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:29:35 -0800 Subject: [PATCH 14/43] simplify --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 683009bb..cc6b4e77 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,7 +50,7 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | - $VERSION=$(git tag | sort --version-sort | tail -n1) + $VERSION="1.2.3.4" dotnet build --configuration Debug -p:FileVersion=$VERSION CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj From 9952d8afe232acf8b00d067bb89d81b65e85ab03 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:31:40 -0800 Subject: [PATCH 15/43] no vars --- .github/workflows/dotnet.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cc6b4e77..210128f0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,8 +50,7 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | - $VERSION="1.2.3.4" - dotnet build --configuration Debug -p:FileVersion=$VERSION CoseSignTool.sln + dotnet build --configuration Debug -p:FileVersion="1.2.3.4" CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj From 94c9f47f9953366ef618fd6a9f38b08924c5eb92 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:44:06 -0800 Subject: [PATCH 16/43] path --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 210128f0..9af3811b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -56,17 +56,17 @@ jobs: dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj - dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj --verbosity detailed + dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj # List the contents of the working directory to make sure all the artifacts are there. - name: List working directory run: ${{ matrix.dir_command }} - # Print the version number of CoseSignTool.exe + # Print the version number of CoseHandler.dll - name: Print version number shell: pwsh run: | - $version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("CoseSignTool/bin/Debug/net8.0/CoseSignTool.exe").FileVersion + $version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("CoseHandler/bin/Debug/netstandard2.0/CoseHandler.dll").FileVersion Write-Output "CoseSignTool version is $version" # Create a changelog that includes all the PRs merged since the last release. From 400f20fd25bffdd19138937644116666c7fa28db Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:56:40 -0800 Subject: [PATCH 17/43] check publish --- .github/workflows/dotnet.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9af3811b..73ba6a5c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,25 +50,18 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | - dotnet build --configuration Debug -p:FileVersion="1.2.3.4" CoseSignTool.sln + dotnet build --configuration Debug CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj - dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj + dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj --verbosity detailed # List the contents of the working directory to make sure all the artifacts are there. - name: List working directory run: ${{ matrix.dir_command }} - # Print the version number of CoseHandler.dll - - name: Print version number - shell: pwsh - run: | - $version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("CoseHandler/bin/Debug/netstandard2.0/CoseHandler.dll").FileVersion - Write-Output "CoseSignTool version is $version" - # Create a changelog that includes all the PRs merged since the last release. # If it's not a pull request, skip to the build job. create_changelog: @@ -245,8 +238,8 @@ jobs: # automatic release creation does not trigger the release event. release_assets: name: release-assets - if: ${{ github.event_name == 'release' || github.event_name == 'push'}} - needs: [ create_release ] + #if: ${{ github.event_name == 'release' || github.event_name == 'push'}} + #needs: [ create_release ] runs-on: ${{ matrix.os }} permissions: actions: write @@ -309,14 +302,22 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - $VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] - dotnet publish --configuration Debug --self-contained true --output published/debug -p:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj - dotnet publish --configuration Release --self-contained true --output published/release -p:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj + # VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] + dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj + dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. + - name: Check File Version + run: | + $filePath = 'published\debug\CoseSignTool.exe' + $versionInfo = (Get-Command $filePath).FileVersionInfo + Write-Output "File Version: $($versionInfo.FileVersion)" + shell: pwsh + # Copy the docs, license, and markdown files to the release folders. - name: Copy docs to release folders run: | + exit 1 # remove this line when the script is ready mkdir -p published/debug/docs cp -r docs/* published/debug/docs/ mkdir -p published/release/docs From 352379ee47728f4a22494866e3d7cc4caf6ba68d Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 14:58:35 -0800 Subject: [PATCH 18/43] the . --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 73ba6a5c..ea0d987a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -309,7 +309,7 @@ jobs: - name: Check File Version run: | - $filePath = 'published\debug\CoseSignTool.exe' + $filePath = '.\published\debug\CoseSignTool.exe' $versionInfo = (Get-Command $filePath).FileVersionInfo Write-Output "File Version: $($versionInfo.FileVersion)" shell: pwsh From c9b9620a57b2497bc719447480e9399a3bb6655c Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 15:01:06 -0800 Subject: [PATCH 19/43] set working dir --- .github/workflows/dotnet.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ea0d987a..9844a305 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -309,10 +309,11 @@ jobs: - name: Check File Version run: | - $filePath = '.\published\debug\CoseSignTool.exe' + $filePath = 'CoseSignTool.exe' $versionInfo = (Get-Command $filePath).FileVersionInfo Write-Output "File Version: $($versionInfo.FileVersion)" shell: pwsh + working-directory: ./published/debug # Copy the docs, license, and markdown files to the release folders. - name: Copy docs to release folders From 3ec04bfa4afe1d80cc1c452e8f8bfbf5a53bc739 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 15:06:15 -0800 Subject: [PATCH 20/43] get-item --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9844a305..385d4861 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -309,8 +309,8 @@ jobs: - name: Check File Version run: | - $filePath = 'CoseSignTool.exe' - $versionInfo = (Get-Command $filePath).FileVersionInfo + $filePath = "CoseSignTool.exe" + $versionInfo = (Get-Item $filePath).FileVersionInfo Write-Output "File Version: $($versionInfo.FileVersion)" shell: pwsh working-directory: ./published/debug From d894411769ce07d9f5a01a97e01b2be331506cc0 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 15:42:16 -0800 Subject: [PATCH 21/43] paths --- .github/workflows/dotnet.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 385d4861..90432aea 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -307,13 +307,19 @@ jobs: dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. + + # List the contents of the published directory to make sure all the artifacts are there. + - name: List published directory + run: ${{ matrix.dir_command }} + working-directory: ./published + - name: Check File Version run: | $filePath = "CoseSignTool.exe" $versionInfo = (Get-Item $filePath).FileVersionInfo Write-Output "File Version: $($versionInfo.FileVersion)" shell: pwsh - working-directory: ./published/debug + working-directory: ../published/debug # Copy the docs, license, and markdown files to the release folders. - name: Copy docs to release folders From b58bb18074a87b4f2db194060bf0c9b2791140ac Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 15:47:59 -0800 Subject: [PATCH 22/43] dll --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 90432aea..def5dd1b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -312,14 +312,14 @@ jobs: - name: List published directory run: ${{ matrix.dir_command }} working-directory: ./published - + - name: Check File Version run: | - $filePath = "CoseSignTool.exe" + $filePath = "CoseSignTool.dll" $versionInfo = (Get-Item $filePath).FileVersionInfo Write-Output "File Version: $($versionInfo.FileVersion)" shell: pwsh - working-directory: ../published/debug + working-directory: ./published/debug # Copy the docs, license, and markdown files to the release folders. - name: Copy docs to release folders From f31c44fab7cc51bb8a440166a0efb82f8fa30ad3 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 15:56:30 -0800 Subject: [PATCH 23/43] kill parens --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index def5dd1b..3751214c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -317,7 +317,7 @@ jobs: run: | $filePath = "CoseSignTool.dll" $versionInfo = (Get-Item $filePath).FileVersionInfo - Write-Output "File Version: $($versionInfo.FileVersion)" + Write-Output "File Version: $versionInfo.FileVersion" shell: pwsh working-directory: ./published/debug From d034dece9a46d066cd6fb5ce24553f638148b3fa Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 16:30:56 -0800 Subject: [PATCH 24/43] tweak --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3751214c..8f38254f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -315,9 +315,9 @@ jobs: - name: Check File Version run: | - $filePath = "CoseSignTool.dll" - $versionInfo = (Get-Item $filePath).FileVersionInfo - Write-Output "File Version: $versionInfo.FileVersion" + # $filePath = "CoseSignTool.dll" + # $versionInfo = (Get-Item $filePath).VersionInfo + Write-Output "File Version: (Get-Item CoseSignTool.dll).VersionInfo.FileVersion" shell: pwsh working-directory: ./published/debug From 80051a7a94d4a164eef0fa6688616b2cb2e2df04 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Fri, 15 Nov 2024 16:35:22 -0800 Subject: [PATCH 25/43] $ --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8f38254f..77a113c6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -317,7 +317,7 @@ jobs: run: | # $filePath = "CoseSignTool.dll" # $versionInfo = (Get-Item $filePath).VersionInfo - Write-Output "File Version: (Get-Item CoseSignTool.dll).VersionInfo.FileVersion" + Write-Output "File Version: $(Get-Item CoseSignTool.dll).VersionInfo.FileVersion" shell: pwsh working-directory: ./published/debug From cae5cca2deb7d2802fa9ad21fab3224f4a3408d9 Mon Sep 17 00:00:00 2001 From: Leith McCombs Date: Tue, 19 Nov 2024 14:14:46 -0800 Subject: [PATCH 26/43] test publish early --- .github/workflows/dotnet.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 77a113c6..43cacdda 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -46,6 +46,30 @@ jobs: with: dotnet-version: 8.0.x + # Build and publish the binaries to ./published. + - name: Publish outputs + run: | + # VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] + dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj + dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj + # Self-contained is needed. Must use .csproj instead of .sln. + + + # List the contents of the published directory to make sure all the artifacts are there. + - name: List published directory + run: ${{ matrix.dir_command }} + working-directory: ./published + + - name: Check File Version + run: | + # $filePath = "CoseSignTool.dll" + # $versionInfo = (Get-Item $filePath).VersionInfo + Write-Output "File Version: $(Get-Item CoseSignTool.dll).VersionInfo.FileVersion" + exit 1 + shell: pwsh + working-directory: ./published/debug + + # Use the Dotnet Test command to load dependencies, build, and test the code. # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug From ff805655cc52d1e786683e0c9727fb74406b6d5b Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:32:37 -0800 Subject: [PATCH 27/43] try publish early and dotnet exec to read version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 43cacdda..761c97a5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -60,6 +60,12 @@ jobs: run: ${{ matrix.dir_command }} working-directory: ./published + - name: Check DLL Version + run: | + dll_path="published/debug/CoseSignTool.dll" + version=$(dotnet exec --runtimeconfig published/debug/CoseSignTool.runtimeconfig.json --depsfile published/debug/CoseSignTool.deps.json --additionalprobingpath $HOME/.nuget/packages --additionalprobingpath /usr/share/dotnet/sdk/NuGetFallbackFolder $dll_path --version) + echo "DLL Version: $version" + - name: Check File Version run: | # $filePath = "CoseSignTool.dll" From c812463461426d0106cf80ed6a5efd8bc05d26d3 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:39:43 -0800 Subject: [PATCH 28/43] remove additional probing path Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 761c97a5..04fab2f3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -63,7 +63,7 @@ jobs: - name: Check DLL Version run: | dll_path="published/debug/CoseSignTool.dll" - version=$(dotnet exec --runtimeconfig published/debug/CoseSignTool.runtimeconfig.json --depsfile published/debug/CoseSignTool.deps.json --additionalprobingpath $HOME/.nuget/packages --additionalprobingpath /usr/share/dotnet/sdk/NuGetFallbackFolder $dll_path --version) + version=$(dotnet exec --runtimeconfig published/debug/CoseSignTool.runtimeconfig.json --depsfile published/debug/CoseSignTool.deps.json $dll_path --version) echo "DLL Version: $version" - name: Check File Version From e5f0be37f3f862df635eebf120f1fa61e61e26d6 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:48:24 -0800 Subject: [PATCH 29/43] try another PS syntax Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 04fab2f3..ac5203c6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -63,7 +63,7 @@ jobs: - name: Check DLL Version run: | dll_path="published/debug/CoseSignTool.dll" - version=$(dotnet exec --runtimeconfig published/debug/CoseSignTool.runtimeconfig.json --depsfile published/debug/CoseSignTool.deps.json $dll_path --version) + version=$(powershell -Command "(Get-Item $dll_path).VersionInfo.FileVersion") echo "DLL Version: $version" - name: Check File Version From c362184d39c841bf1d7b07463ead79abf464ad69 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:56:57 -0800 Subject: [PATCH 30/43] fix ps version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ac5203c6..8cf3fd7d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -60,18 +60,11 @@ jobs: run: ${{ matrix.dir_command }} working-directory: ./published - - name: Check DLL Version - run: | - dll_path="published/debug/CoseSignTool.dll" - version=$(powershell -Command "(Get-Item $dll_path).VersionInfo.FileVersion") - echo "DLL Version: $version" - - name: Check File Version run: | - # $filePath = "CoseSignTool.dll" - # $versionInfo = (Get-Item $filePath).VersionInfo - Write-Output "File Version: $(Get-Item CoseSignTool.dll).VersionInfo.FileVersion" - exit 1 + $file = Get-Item "published/debug/CoseSignTool.dll" + $version = $file.VersionInfo.FileVersion + Write-Output "File Version is $version" shell: pwsh working-directory: ./published/debug @@ -80,6 +73,7 @@ jobs: # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug run: | + exit 1 dotnet build --configuration Debug CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj From 76235ebe18090046db02b2a4975c0e6e06e44bff Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:00:13 -0800 Subject: [PATCH 31/43] file path Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8cf3fd7d..3f014233 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -62,7 +62,7 @@ jobs: - name: Check File Version run: | - $file = Get-Item "published/debug/CoseSignTool.dll" + $file = Get-Item "CoseSignTool.dll" $version = $file.VersionInfo.FileVersion Write-Output "File Version is $version" shell: pwsh From b9e231705e6dafd98bb18f7f6773d514259e0801 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:22:48 -0800 Subject: [PATCH 32/43] validate call syntax Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 74 ++++++++---------------------------- 1 file changed, 16 insertions(+), 58 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3f014233..3a6fc73d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -28,6 +28,8 @@ jobs: name: build-${{matrix.os}} if: ${{ github.event_name == 'pull_request' }} runs-on: ${{ matrix.os }} + outputs: + test_val: ${{ steps.build-test.outputs.test_val }} strategy: matrix: include: @@ -46,32 +48,10 @@ jobs: with: dotnet-version: 8.0.x - # Build and publish the binaries to ./published. - - name: Publish outputs - run: | - # VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] - dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj - dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj - # Self-contained is needed. Must use .csproj instead of .sln. - - - # List the contents of the published directory to make sure all the artifacts are there. - - name: List published directory - run: ${{ matrix.dir_command }} - working-directory: ./published - - - name: Check File Version - run: | - $file = Get-Item "CoseSignTool.dll" - $version = $file.VersionInfo.FileVersion - Write-Output "File Version is $version" - shell: pwsh - working-directory: ./published/debug - - # Use the Dotnet Test command to load dependencies, build, and test the code. # We have to run the test projects individually so CoseSignTool.Tests can run under arm64 on the Mac runner. - name: Build and Test debug + id: build-test run: | exit 1 dotnet build --configuration Debug CoseSignTool.sln @@ -81,6 +61,8 @@ jobs: dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj --verbosity detailed + # get rid of this + echo "::set-output name=test_val::${{ github.event_name }}" # List the contents of the working directory to make sure all the artifacts are there. - name: List working directory @@ -105,6 +87,12 @@ jobs: if: ${{ github.event_name == 'pull_request' }} uses: actions/checkout@v2 + # Get rid of this + - name: Check syntax + run: | + version=$GITHUB_ENV['needs.build.outputs.test_val'] + echo "event is $version" + # Sync the changelog version. - name: Fetch and checkout if: ${{ github.event_name == 'pull_request' }} @@ -262,8 +250,8 @@ jobs: # automatic release creation does not trigger the release event. release_assets: name: release-assets - #if: ${{ github.event_name == 'release' || github.event_name == 'push'}} - #needs: [ create_release ] + if: ${{ github.event_name == 'release' || github.event_name == 'push'}} + needs: [ create_release ] runs-on: ${{ matrix.os }} permissions: actions: write @@ -294,35 +282,6 @@ jobs: - name: Checkout code again uses: actions/checkout@v3 - # Update file versions. - # - name: Update file versions - # run: | - # # Define the new version number - # $version = $env:GITHUB_ENV['needs.create_release.outputs.tag_name'] - - # # Get all non-test .csproj files in the solution directory and its subdirectories - # $csprojFiles = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -Filter "*.csproj" - # | Where-Object { $_.Name -notmatch "test" } - - # foreach ($file in $csprojFiles) { - # # Read the content of the .csproj file - # $content = Get-Content -Path $file.FullName - - # # Update the version number in the .csproj file - # $updatedContent = $content -replace '.*?', "$newVersion" - - # # Write the updated content back to the .csproj file - # Set-Content -Path $file.FullName -Value $updatedContent - - # # Make sure the version number was updated - # if (Get-Content -Path $file.FullName | Select-String -Pattern "$newVersion") { - # Write-Host "Updated version in $($file.FullName)" - # } else { - # Write-Host "Failed to update version in $($file.FullName)" - # } - # } - # shell: pwsh - # Build and publish the binaries to ./published. - name: Publish outputs run: | @@ -330,7 +289,6 @@ jobs: dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. - # List the contents of the published directory to make sure all the artifacts are there. - name: List published directory @@ -339,9 +297,9 @@ jobs: - name: Check File Version run: | - # $filePath = "CoseSignTool.dll" - # $versionInfo = (Get-Item $filePath).VersionInfo - Write-Output "File Version: $(Get-Item CoseSignTool.dll).VersionInfo.FileVersion" + $file = Get-Item "CoseSignTool.dll" + $version = $file.VersionInfo.FileVersion + Write-Output "File Version is $version" shell: pwsh working-directory: ./published/debug From dc24293c286e3ba8312944dee8b9cf146e86404d Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:24:14 -0800 Subject: [PATCH 33/43] get rid of exit Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3a6fc73d..504b0257 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -53,7 +53,6 @@ jobs: - name: Build and Test debug id: build-test run: | - exit 1 dotnet build --configuration Debug CoseSignTool.sln dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj From 4c8e02a92a0bc2d0924b4b9425bb1bec6ec4521a Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:37:16 -0800 Subject: [PATCH 34/43] alternate syntax Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 504b0257..59ab86ef 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -54,12 +54,12 @@ jobs: id: build-test run: | dotnet build --configuration Debug CoseSignTool.sln - dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj - dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj - dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj - dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj - dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj - dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj --verbosity detailed + #dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj + #dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj + #dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj + #dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj + #dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj + #dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj # get rid of this echo "::set-output name=test_val::${{ github.event_name }}" @@ -89,8 +89,8 @@ jobs: # Get rid of this - name: Check syntax run: | - version=$GITHUB_ENV['needs.build.outputs.test_val'] - echo "event is $version" + EVENT=${{ needs.build.outputs.test_val }} + echo "event is $EVENT" # Sync the changelog version. - name: Fetch and checkout From 41101702143c04475c7a16d2f8a4e72a3458bb0c Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:45:22 -0800 Subject: [PATCH 35/43] cleanup Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 59ab86ef..c6c69ca6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -28,8 +28,6 @@ jobs: name: build-${{matrix.os}} if: ${{ github.event_name == 'pull_request' }} runs-on: ${{ matrix.os }} - outputs: - test_val: ${{ steps.build-test.outputs.test_val }} strategy: matrix: include: @@ -54,15 +52,13 @@ jobs: id: build-test run: | dotnet build --configuration Debug CoseSignTool.sln - #dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj - #dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj - #dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj - #dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj - #dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj - #dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj - # get rid of this - echo "::set-output name=test_val::${{ github.event_name }}" - + dotnet test --no-restore CoseSign1.Tests/CoseSign1.Tests.csproj + dotnet test --no-restore CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj + dotnet test --no-restore CoseSign1.Headers.Tests/CoseSign1.Headers.Tests.csproj + dotnet test --no-restore CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj + dotnet test --no-restore CoseHandler.Tests/CoseHandler.Tests.csproj + dotnet test --no-restore CoseSignTool.Tests/CoseSignTool.Tests.csproj + # List the contents of the working directory to make sure all the artifacts are there. - name: List working directory run: ${{ matrix.dir_command }} @@ -85,12 +81,6 @@ jobs: - name: Checkout code if: ${{ github.event_name == 'pull_request' }} uses: actions/checkout@v2 - - # Get rid of this - - name: Check syntax - run: | - EVENT=${{ needs.build.outputs.test_val }} - echo "event is $EVENT" # Sync the changelog version. - name: Fetch and checkout @@ -284,9 +274,9 @@ jobs: # Build and publish the binaries to ./published. - name: Publish outputs run: | - # VERSION=$GITHUB_ENV['needs.create_release.outputs.tag_name'] - dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj - dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion="1.2.3.4" CoseSignTool/CoseSignTool.csproj + VERSION=${{ needs.create_release.outputs.tag_name }} + dotnet publish --configuration Debug --self-contained true --output published/debug --property:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj + dotnet publish --configuration Release --self-contained true --output published/release --property:FileVersion=$VERSION CoseSignTool/CoseSignTool.csproj # Self-contained is needed. Must use .csproj instead of .sln. # List the contents of the published directory to make sure all the artifacts are there. @@ -294,6 +284,7 @@ jobs: run: ${{ matrix.dir_command }} working-directory: ./published + # Verify that the file versions on the DLLs match the release version - name: Check File Version run: | $file = Get-Item "CoseSignTool.dll" From c4423942d9399bcdb4e75085d3c85a003a088fb8 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:46:55 -0800 Subject: [PATCH 36/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseHandler/CoseHandler.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseHandler/CoseHandler.csproj b/CoseHandler/CoseHandler.csproj index 0f852f91..c56b6f4c 100644 --- a/CoseHandler/CoseHandler.csproj +++ b/CoseHandler/CoseHandler.csproj @@ -4,9 +4,6 @@ netstandard2.0 latest - - - 1.0.0 From 861449bbbeac3cdf17a23af8084cbb4fb540fada Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:47:26 -0800 Subject: [PATCH 37/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseIndirectSignature/CoseIndirectSignature.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseIndirectSignature/CoseIndirectSignature.csproj b/CoseIndirectSignature/CoseIndirectSignature.csproj index cc8a0a63..d5efd728 100644 --- a/CoseIndirectSignature/CoseIndirectSignature.csproj +++ b/CoseIndirectSignature/CoseIndirectSignature.csproj @@ -4,9 +4,6 @@ netstandard2.0 latest - - - 1.0.0 From eafa8199814c5444ce190943f936f32a6dbc4326 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:47:54 -0800 Subject: [PATCH 38/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseSign1.Abstractions/CoseSign1.Abstractions.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj b/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj index 9c98d16a..1dd43543 100644 --- a/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj +++ b/CoseSign1.Abstractions/CoseSign1.Abstractions.csproj @@ -4,9 +4,6 @@ netstandard2.0 latest - - - 1.0.0 From a733da3173db7107fc8cb80f034f6ff0219f18c8 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:48:14 -0800 Subject: [PATCH 39/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseSign1.Certificates/CoseSign1.Certificates.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseSign1.Certificates/CoseSign1.Certificates.csproj b/CoseSign1.Certificates/CoseSign1.Certificates.csproj index 87377a70..49594fba 100644 --- a/CoseSign1.Certificates/CoseSign1.Certificates.csproj +++ b/CoseSign1.Certificates/CoseSign1.Certificates.csproj @@ -4,9 +4,6 @@ netstandard2;net8.0 latest - - - 1.0.0 From d7b1aa5fb5f37b0a70b893a83fc67be3c4efff5b Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:48:34 -0800 Subject: [PATCH 40/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseSign1.Headers/CoseSign1.Headers.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseSign1.Headers/CoseSign1.Headers.csproj b/CoseSign1.Headers/CoseSign1.Headers.csproj index 3c74d01c..a88c0124 100644 --- a/CoseSign1.Headers/CoseSign1.Headers.csproj +++ b/CoseSign1.Headers/CoseSign1.Headers.csproj @@ -4,9 +4,6 @@ netstandard2.0 latest - - - 1.0.0 From 25eaf94162ff2fb7f77436f2612b12a829e2d4f8 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:48:53 -0800 Subject: [PATCH 41/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseSign1/CoseSign1.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseSign1/CoseSign1.csproj b/CoseSign1/CoseSign1.csproj index 240f4363..944f7bc6 100644 --- a/CoseSign1/CoseSign1.csproj +++ b/CoseSign1/CoseSign1.csproj @@ -4,9 +4,6 @@ netstandard2.0 latest - - - 1.0.0 From 3046c5d0663566c0f9503bbbf866a08d2f0a9213 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:49:15 -0800 Subject: [PATCH 42/43] remove hard-coded file version Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- CoseSignTool/CoseSignTool.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/CoseSignTool/CoseSignTool.csproj b/CoseSignTool/CoseSignTool.csproj index 6488cbe5..1a41a6ff 100644 --- a/CoseSignTool/CoseSignTool.csproj +++ b/CoseSignTool/CoseSignTool.csproj @@ -5,9 +5,6 @@ net8.0 win-x64;linux-x64;osx-arm64 AnyCPU - - - 1.0.0 From 88dc9e1ec54861354414770c83fbcf985c77c8e1 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:34:42 -0800 Subject: [PATCH 43/43] remove exit Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> --- .github/workflows/dotnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c6c69ca6..e82530bc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -296,7 +296,6 @@ jobs: # Copy the docs, license, and markdown files to the release folders. - name: Copy docs to release folders run: | - exit 1 # remove this line when the script is ready mkdir -p published/debug/docs cp -r docs/* published/debug/docs/ mkdir -p published/release/docs