From 4227ef0bffa8d0e1bcd624c59b471f229d74a2a7 Mon Sep 17 00:00:00 2001 From: lemccomb <117306942+lemccomb@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:32:20 -0700 Subject: [PATCH] Create rerelease.yml (#103) * Create rerelease.yml Adds a workflow to re-release assets for existing releases. Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> * Update changelog for release --------- Signed-off-by: lemccomb <117306942+lemccomb@users.noreply.github.com> Co-authored-by: GitHub Action --- .github/workflows/rerelease.yml | 112 ++++++++++++++++++++++++++++++++ CHANGELOG.md | 94 +++++++++++++++------------ 2 files changed, 163 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/rerelease.yml diff --git a/.github/workflows/rerelease.yml b/.github/workflows/rerelease.yml new file mode 100644 index 00000000..1eaefb33 --- /dev/null +++ b/.github/workflows/rerelease.yml @@ -0,0 +1,112 @@ +#### Re-release Assets #### +# This workflow exists solely to replace the zip files on existing releases, and should only be run manually. +# It updates all of the releases in the given range. + +name: Re-release Assets +on: + workflow_dispatch: + inputs: + oldest: + description: 'Oldest release to include' + required: true + default: 'v0.3.1' + newest: + description: 'Newest release to include' + required: true + default: 'current' + +jobs: + release_assets_by_tag: + name: release-assets + runs-on: ${{ matrix.os }} + permissions: + actions: write + contents: write + deployments: write + packages: write + pull-requests: write + security-events: write + statuses: write + strategy: + matrix: + include: + - os: windows-latest + dir_command: gci -Recurse + zip_command_debug: Compress-Archive -Path ./debug/ -DestinationPath CoseSignTool-Windows-debug.zip + zip_command_release: Compress-Archive -Path ./release/ -DestinationPath CoseSignTool-Windows-release.zip + - os: ubuntu-latest + dir_command: ls -a -R + zip_command_debug: zip -r CoseSignTool-Linux-debug.zip ./debug/ + zip_command_release: zip -r CoseSignTool-Linux-release.zip ./release/ + - os: macos-latest + dir_command: ls -a -R + zip_command_debug: zip -r CoseSignTool-MacOS-debug.zip ./debug/ + zip_command_release: zip -r CoseSignTool-MacOS-release.zip ./release/ + + steps: + # Checkout the branch. + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Get list of tags + 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 + + - name: Release assets for selected tags + run: | + 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" + 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" + 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" + ${{ 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::" + done diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccc3faa..f33c2692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [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) + +**Merged pull requests:** + +- Fix slashes [\#102](https://github.com/microsoft/CoseSignTool/pull/102) ([lemccomb](https://github.com/lemccomb)) + ## [v1.2.6-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.6-pre1) (2024-08-21) [Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.6...v1.2.6-pre1) @@ -30,19 +38,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.5...v1.2.5-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre3...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.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-pre3...v1.2.5) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5...v1.2.4-pre3) -## [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.4-pre2...v1.2.4-pre3) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.4-pre2...v1.2.5) **Merged pull requests:** @@ -130,7 +138,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.2...v1.2.1-pre2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1-pre1...v1.2.1-pre2) **Closed issues:** @@ -140,25 +148,25 @@ - more granular error codes [\#86](https://github.com/microsoft/CoseSignTool/pull/86) ([lemccomb](https://github.com/lemccomb)) -## [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-pre1...v1.2.2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.2...v1.2.1-pre1) -## [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.0-pre1...v1.2.1-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1...v1.2.2) **Merged pull requests:** - Revert "Add .exe to CoseSignTool NuGet" [\#83](https://github.com/microsoft/CoseSignTool/pull/83) ([elantiguamsft](https://github.com/elantiguamsft)) -## [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.1...v1.2.0-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.0-pre1...v1.2.1) -## [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.exeTest...v1.2.1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.exeTest...v1.2.0-pre1) **Merged pull requests:** @@ -174,19 +182,19 @@ ## [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.2.0) +[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:** @@ -222,19 +230,19 @@ ## [v1.1.6](https://github.com/microsoft/CoseSignTool/tree/v1.1.6) (2024-02-07) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.5...v1.1.6) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.4-pre1...v1.1.6) **Merged pull requests:** - Only hit iterator once [\#75](https://github.com/microsoft/CoseSignTool/pull/75) ([JeromySt](https://github.com/JeromySt)) -## [v1.1.5](https://github.com/microsoft/CoseSignTool/tree/v1.1.5) (2024-01-31) +## [v1.1.4-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.4-pre1) (2024-01-31) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.4-pre1...v1.1.5) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.5...v1.1.4-pre1) -## [v1.1.4-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.4-pre1) (2024-01-31) +## [v1.1.5](https://github.com/microsoft/CoseSignTool/tree/v1.1.5) (2024-01-31) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.4...v1.1.4-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.4...v1.1.5) **Merged pull requests:** @@ -246,31 +254,31 @@ ## [v1.1.3-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.3-pre1) (2024-01-26) -[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.2-pre1...v1.1.3-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.3...v1.1.3-pre1) **Merged pull requests:** - Adding Validation Option to Output Certificate Chain [\#73](https://github.com/microsoft/CoseSignTool/pull/73) ([elantiguamsft](https://github.com/elantiguamsft)) -## [v1.1.2-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.2-pre1) (2024-01-24) +## [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.3...v1.1.2-pre1) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.2-pre1...v1.1.3) -## [v1.1.3](https://github.com/microsoft/CoseSignTool/tree/v1.1.3) (2024-01-24) +## [v1.1.2-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.1.2-pre1) (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.2-pre1) **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:** @@ -278,19 +286,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:** @@ -363,7 +371,7 @@ ## [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.2...v0.3.1-pre.10) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.9...v0.3.1-pre.10) **Merged pull requests:** @@ -373,13 +381,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.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.9...v0.3.2) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.2...v0.3.1-pre.9) -## [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.1-pre.8...v0.3.1-pre.9) +[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.8...v0.3.2) **Merged pull requests:**