Skip to content

Commit

Permalink
Fix rerelease workflow again (#107)
Browse files Browse the repository at this point in the history
Add a workflow to rerelease assets for existing releases
* Restore workflow, include CoseSign1.Headers tests

* Update changelog for release

---------

Signed-off-by: lemccomb <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
lemccomb and actions-user authored Aug 26, 2024
1 parent 8afcd15 commit 9a3338c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
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
Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/rerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
workflow_dispatch:
inputs:
oldest:
description: 'Oldest release to include'
description: 'Oldest release to include' # ${{ github.event.inputs.oldest }}
required: true
default: 'v0.3.1'
default: 'v1.2.3'
newest:
description: 'Newest release to include'
required: true
default: 'current'
default: 'v1.2.4'

jobs:
release_assets_by_tag:
Expand All @@ -31,26 +31,29 @@ jobs:
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
zip_command_debug: zip --quiet -r CoseSignTool-Windows-debug.zip ./published/debug/
zip_command_release: zip --quiet -r CoseSignTool-Windows-release.zip ./published/release/
- 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/
zip_command_debug: zip --quiet -r CoseSignTool-Linux-debug.zip ./published/debug/
zip_command_release: zip --quiet -r CoseSignTool-Linux-release.zip ./published/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/
zip_command_debug: zip --quiet -r CoseSignTool-MacOS-debug.zip ./published/debug/
zip_command_release: zip --quiet -r CoseSignTool-MacOS-release.zip ./published/release/

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Zip command
if: ${{ matrix.os == 'windows-latest' }}
run: choco install zip

- name: Get list of tags
run: |
oldest=${{ github.event.inputs.oldest }}
newest=${{ github.event.inputs.newest }}
git fetch --quiet
tags=$(git tag --list --sort=version:refname | awk -v old=${{ github.event.inputs.oldest }} -v new=${{ github.event.inputs.newest }} '$0 >= old && $0 <= new')
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
shell: bash
Expand All @@ -59,10 +62,13 @@ jobs:
run: |
git fetch --tags
for tag in ${{ env.tagsToUpdate }}; do
echo "**** Checkout $tag ****"
git checkout "$tag" --quiet
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
echo "publish succeeded"
echo "**** Copy documentation for $tag ****"
for folder in debug release; do
Expand All @@ -75,10 +81,12 @@ jobs:
echo "**** Create zip files for $tag ****"
${{ matrix.zip_command_debug }}
${{ matrix.zip_command_release }}
${{ matrix.dir_command }}
find . -type f -name "*.zip"
echo "**** Upload zip files to GitHub ****"
gh release upload $tag ./published/CoseSignTool-*.zip
gh release upload $tag ./CoseSignTool-*.zip --clobber
done
shell: bash
env:
GH_TOKEN: ${{ github.token }}
48 changes: 28 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [v1.2.7-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.7-pre3) (2024-08-26)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.7-pre2...v1.2.7-pre3)

**Merged pull requests:**

- User/lemccomb/re release workflow3 [\#106](https://github.com/microsoft/CoseSignTool/pull/106) ([lemccomb](https://github.com/lemccomb))

## [v1.2.7-pre2](https://github.com/microsoft/CoseSignTool/tree/v1.2.7-pre2) (2024-08-23)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.7-pre1...v1.2.7-pre2)
Expand Down Expand Up @@ -30,19 +38,19 @@

## [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)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5-pre3...v1.2.6-pre1)

**Merged pull requests:**

- Publish self-contained [\#101](https://github.com/microsoft/CoseSignTool/pull/101) ([lemccomb](https://github.com/lemccomb))

## [v1.2.6](https://github.com/microsoft/CoseSignTool/tree/v1.2.6) (2024-08-19)
## [v1.2.5-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.5-pre3) (2024-08-19)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5-pre3...v1.2.6)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.6...v1.2.5-pre3)

## [v1.2.5-pre3](https://github.com/microsoft/CoseSignTool/tree/v1.2.5-pre3) (2024-08-19)
## [v1.2.6](https://github.com/microsoft/CoseSignTool/tree/v1.2.6) (2024-08-19)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5-pre2...v1.2.5-pre3)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.5-pre2...v1.2.6)

**Merged pull requests:**

Expand Down Expand Up @@ -138,19 +146,19 @@

## [v1.2.3-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.3-pre1) (2024-05-31)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3...v1.2.3-pre1)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.2-pre1...v1.2.3-pre1)

**Merged pull requests:**

- upgrade to .NET 8, add docs to package, add retry loop for revocation server [\#89](https://github.com/microsoft/CoseSignTool/pull/89) ([lemccomb](https://github.com/lemccomb))

## [v1.2.3](https://github.com/microsoft/CoseSignTool/tree/v1.2.3) (2024-03-20)
## [v1.2.2-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.2-pre1) (2024-03-20)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.2-pre1...v1.2.3)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.3...v1.2.2-pre1)

## [v1.2.2-pre1](https://github.com/microsoft/CoseSignTool/tree/v1.2.2-pre1) (2024-03-20)
## [v1.2.3](https://github.com/microsoft/CoseSignTool/tree/v1.2.3) (2024-03-20)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1-pre2...v1.2.2-pre1)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.2.1-pre2...v1.2.3)

**Merged pull requests:**

Expand Down Expand Up @@ -230,19 +238,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.7...v1.1.7-pre1)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6-pre1...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.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-pre1...v1.1.7)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.7...v1.1.6-pre1)

## [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.6...v1.1.6-pre1)
[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v1.1.6...v1.1.7)

**Merged pull requests:**

Expand Down Expand Up @@ -375,7 +383,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:**

Expand All @@ -385,13 +393,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.1-pre.9...v0.3.1-pre.10)

**Merged pull requests:**

Expand Down

0 comments on commit 9a3338c

Please sign in to comment.