diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 827362f9..ad8208fd 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -39,7 +39,7 @@ jobs: dir_command: ls -a -R steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v3 @@ -48,15 +48,14 @@ jobs: # 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. - # TODO: Remove the dotnet publish commands once we know they work. - name: Build and Test debug run: | dotnet build --configuration Debug CoseSignTool.sln - dotnet test CoseSign1.Tests/CoseSign1.Tests.csproj - dotnet test CoseSign1.Certificates.Tests/CoseSign1.Certificates.Tests.csproj - dotnet test CoseIndirectSignature.Tests/CoseIndirectSignature.Tests.csproj - dotnet test CoseHandler.Tests/CoseHandler.Tests.csproj - dotnet test 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 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 # List the contents of the working directory to make sure all the artifacts are there. - name: List working directory diff --git a/.github/workflows/rerelease.yml b/.github/workflows/rerelease.yml index 1eaefb33..b0c4e4ff 100644 --- a/.github/workflows/rerelease.yml +++ b/.github/workflows/rerelease.yml @@ -44,7 +44,6 @@ jobs: zip_command_release: zip -r CoseSignTool-MacOS-release.zip ./release/ steps: - # Checkout the branch. - name: Checkout repository uses: actions/checkout@v4 @@ -52,61 +51,34 @@ jobs: run: | oldest=${{ github.event.inputs.oldest }} newest=${{ github.event.inputs.newest }} - tags=$(git tag --sort=creatordate "$oldest".."$newest") - echo "tagsToUpdate=[$(echo $tags | tr ' ' ',')]" >> $GITHUB_ENV + git fetch --quiet + tags=$(git tag --list --sort=version:refname | awk -v old="$oldest" -v new="$newest" '$0 >= old && $0 <= new') + echo "tags = $tags" + echo "tagsToUpdate=$(echo $tags)" >> $GITHUB_ENV - name: Release assets for selected tags run: | + git fetch --tags for tag in ${{ env.tagsToUpdate }}; do - echo "**** Release $tag ****\n******************************\n" - - # Run checkout action - echo "::group::Checkout" - echo "Checkout tagged release" - - name: Checkout tagged release - uses: actions/checkout@v4 - with: - ref: $tag - echo "::endgroup::" - - # Build and publish the binaries to ./published. - echo "::group::Publish" - echo "Build and publish" + echo "**** Build and publish $tag ****" + git checkout "$tag" 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. - echo "::endgroup::" - # Copy the docs, license, and markdown files to the release folders. - echo "::group::Copy" - echo "Copy documentation" + echo "**** Copy documentation for $tag ****" for folder in debug release; do mkdir -p published/$folder/docs cp -r docs/* published/$folder/docs/ cp -r LICENSE published/$folder/ cp -r *.md published/$folder/ done - echo "::endgroup::" - # Create zip files for release. - echo "::group::Zips" - echo "Create zip files for the release" + echo "**** Create zip files for $tag ****" ${{ matrix.zip_command_debug }} ${{ matrix.zip_command_release }} ${{ matrix.dir_command }} - echo "::endgroup::" - # Upload the zipped assets to the release. - echo "::group::Upload" - echo "Upload .zip files to Github" - - name: Upload artifacts - id: upload - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./published/CoseSignTool-*.zip - file_glob: true - overwrite: true - tag: ${{ needs.create_release.outputs.tag_name }} - echo "::endgroup::" + echo "**** Upload zip files to GitHub ****" + gh release upload $tag ./published/CoseSignTool-*.zip + done diff --git a/CHANGELOG.md b/CHANGELOG.md index f33c2692..108dc5f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [v1.2.7-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.7-pre1) (2024-08-22) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.7...v1.2.7-pre1) + +**Merged pull requests:** + +- Create rerelease.yml [\#103](https://github.com/microsoft/CoseSignTool/pull/103) ([lemccomb](https://github.com/lemccomb)) + +## [v1.2.7](https://github.com/microsoft/CoseSignTool/tree/v1.2.7) (2024-08-22) + +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.6-pre2...v1.2.7) + ## [v1.2.6-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.2.6-pre2) (2024-08-22) [Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.6-pre1...v1.2.6-pre2) @@ -38,19 +50,19 @@ ## [v1.2.5-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.5-pre1) (2024-08-14) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre3...v1.2.5-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5...v1.2.5-pre1) **Merged pull requests:** - Update package dependencies [\#99](https://github.com/microsoft/CoseSignTool/pull/99) ([lemccomb](https://github.com/lemccomb)) -## [v1.2.4-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.4-pre3) (2024-08-06) +## [v1.2.5](https://github.com/microsoft/CoseSignTool/tree/v1.2.5) (2024-08-06) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5...v1.2.4-pre3) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre3...v1.2.5) -## [v1.2.5](https://github.com/microsoft/CoseSignTool/tree/v1.2.5) (2024-08-06) +## [v1.2.4-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.4-pre3) (2024-08-06) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre2...v1.2.5) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre2...v1.2.4-pre3) **Merged pull requests:** @@ -66,19 +78,19 @@ ## [v1.2.4-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.4-pre1) (2024-07-15) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4...v1.2.4-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3-pre7...v1.2.4-pre1) **Merged pull requests:** - User/lemccomb/fileread [\#94](https://github.com/microsoft/CoseSignTool/pull/94) ([lemccomb](https://github.com/lemccomb)) -## [v1.2.4](https://github.com/microsoft/CoseSignTool/tree/v1.2.4) (2024-06-14) +## [v1.2.3-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.2.3-pre7) (2024-06-14) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3-pre7...v1.2.4) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4...v1.2.3-pre7) -## [v1.2.3-pre7](https://github.com/microsoft/CoseSignTool/tree/v1.2.3-pre7) (2024-06-14) +## [v1.2.4](https://github.com/microsoft/CoseSignTool/tree/v1.2.4) (2024-06-14) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3-pre6...v1.2.3-pre7) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3-pre6...v1.2.4) **Merged pull requests:** @@ -138,7 +150,7 @@ ## [v1.2.1-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.2.1-pre2) (2024-03-15) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1-pre1...v1.2.1-pre2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.2...v1.2.1-pre2) **Closed issues:** @@ -148,13 +160,13 @@ - more granular error codes [\#86](https://github.com/microsoft/CoseSignTool/pull/86) ([lemccomb](https://github.com/lemccomb)) -## [v1.2.1-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.1-pre1) (2024-03-12) +## [v1.2.2](https://github.com/microsoft/CoseSignTool/tree/v1.2.2) (2024-03-12) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.2...v1.2.1-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1-pre1...v1.2.2) -## [v1.2.2](https://github.com/microsoft/CoseSignTool/tree/v1.2.2) (2024-03-12) +## [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.2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1...v1.2.1-pre1) **Merged pull requests:** @@ -174,15 +186,15 @@ ## [v1.2.exeTest](https://github.com/microsoft/CoseSignTool/tree/v1.2.exeTest) (2024-03-06) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8-pre1...v1.2.exeTest) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0...v1.2.exeTest) -## [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.2.0...v1.1.8-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8-pre1...v1.2.0) -## [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...v1.2.0) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.8...v1.1.8-pre1) **Merged pull requests:** @@ -210,19 +222,19 @@ ## [v1.1.7-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.7-pre1) (2024-02-14) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6-pre1...v1.1.7-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7...v1.1.7-pre1) **Merged pull requests:** - Command Line Validation of Indirect Signatures [\#78](https://github.com/microsoft/CoseSignTool/pull/78) ([elantiguamsft](https://github.com/elantiguamsft)) -## [v1.1.6-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.6-pre1) (2024-02-07) +## [v1.1.7](https://github.com/microsoft/CoseSignTool/tree/v1.1.7) (2024-02-07) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7...v1.1.6-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6-pre1...v1.1.7) -## [v1.1.7](https://github.com/microsoft/CoseSignTool/tree/v1.1.7) (2024-02-07) +## [v1.1.6-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.6-pre1) (2024-02-07) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6...v1.1.7) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6...v1.1.6-pre1) **Merged pull requests:** @@ -286,19 +298,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.1...v1.1.1-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre7...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.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-pre7...v1.1.1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.1...v1.1.0-pre7) -## [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.0-pre6...v1.1.0-pre7) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.0-pre6...v1.1.1) **Closed issues:** diff --git a/CoseSignTool.sln b/CoseSignTool.sln index 7fb758c3..fec24e86 100644 --- a/CoseSignTool.sln +++ b/CoseSignTool.sln @@ -60,6 +60,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{ .github\workflows\dependency-review.yml = .github\workflows\dependency-review.yml .github\workflows\dotnet.yml = .github\workflows\dotnet.yml .github\workflows\OpenPR.yml = .github\workflows\OpenPR.yml + .github\workflows\rerelease.yml = .github\workflows\rerelease.yml EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoseSign1.Headers", "CoseSign1.Headers\CoseSign1.Headers.csproj", "{DE822040-D5AB-41C8-83B2-4938FF00C7E5}"