From d9e3e0a3866d73309a2d9641df5ca99bf7132172 Mon Sep 17 00:00:00 2001 From: Maxim <17935127+delatrie@users.noreply.github.com> Date: Sat, 30 Mar 2024 04:41:48 +0700 Subject: [PATCH] Build & publishing fixes (#471) * Make AspectInjector executable * Fix release workflow - Remove tag updage in the schema link of Allure.Reqnroll's allureConfig.json - Fix release notes link update - Provide just the URL as the release notes link * Fix publishing - AspectInjector_Location being provided to a wrong step - Missing PackageId for specflow and xunit - Put PackageId if reqnroll on top - Remove extra publishing target leftover from xunit * Remove unused xunit.runner.reporter ref * Remove link to yet non-existent doc for reqnroll * Set explicit permissions in labeler --- .github/workflows/labeler.yml | 3 +++ .github/workflows/publish.yml | 12 ++++++------ .github/workflows/release.yml | 4 +--- Allure.Reqnroll/Allure.Reqnroll.csproj | 2 +- Allure.SpecFlow/Allure.SpecFlow.csproj | 1 + Allure.Xunit/Allure.Xunit.csproj | 7 ++----- Directory.Build.props | 4 ++-- README.md | 2 +- build/AspectInjector/linux-x64/AspectInjector | Bin 9 files changed, 17 insertions(+), 18 deletions(-) mode change 100644 => 100755 build/AspectInjector/linux-x64/AspectInjector diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 21e769c0..f5ebd469 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -5,6 +5,9 @@ on: jobs: triage: + permissions: + contents: read + pull-requests: write runs-on: ubuntu-latest steps: - uses: actions/labeler@v5 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e627b5c0..108a734c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,24 +26,24 @@ jobs: run: | dotnet restore ${{ env.SOLUTION_PATH }} + # Use AspectInjector 2.8.2 which, unlike 2.8.1, correctly sets PdbChecksum + # The only reason we're still referencing 2.8.1 from projects is that + # 2.8.2 doesn't work well on Mac OS ARM - name: 'Build project using dotnet' run: | dotnet build ${{ env.SOLUTION_PATH }}\ --no-restore\ --configuration ${{ env.BUILD_CONFIGURATION }}\ - -p:ContinuousIntegrationBuild=true + -p:ContinuousIntegrationBuild=true\ + "-p:AspectInjector_Location=${{ github.workspace }}/build/AspectInjector/linux-x64/AspectInjector" - # Use AspectInjector 2.8.2 which, unlike 2.8.1, correctly sets PdbChecksum - # The only reason we're' still referencing 2.8.1 from projects is that - # 2.8.2 doesn't work well on Mac OS ARM - name: 'Pack project' run: | dotnet pack ${{ env.SOLUTION_PATH }}\ --no-restore\ --no-build\ --configuration ${{ env.BUILD_CONFIGURATION }}\ - "-p:PackageOutputPath=${{ github.workspace }}/${{ env.PACKAGE_OUTPUT_PATH }}"\ - "-p:AspectInjector_Location=${{ github.workspace }}/build/AspectInjector/linux-x64" + "-p:PackageOutputPath=${{ github.workspace }}/${{ env.PACKAGE_OUTPUT_PATH }}" - name: 'NuGet publish' run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18cf8290..6f3f6fb0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,11 +73,9 @@ jobs: cat ./Allure.Reqnroll/allureConfig.Template.json sed -i -e '/"$schema"/s|/allure-csharp/[^/]*|/allure-csharp/${{ env.release_version }}|g' ./Allure.Reqnroll.Tests.Samples/allureConfig.json cat ./Allure.Reqnroll.Tests.Samples/allureConfig.json - sed -i -e '/"$schema"/s|/allure-csharp/[^/]*|/allure-csharp/${{ env.release_version }}|g' ./Allure.Reqnroll.Tests/allureConfig.json - cat ./Allure.Reqnroll.Tests/allureConfig.json - name: "Update release notes link" run: | - sed -i -e '//,/<\/PackageReleaseNotes>/ s|/allure-csharp/releases/tag/.*\.|/allure-csharp/releases/tag/${{ inputs.nextVersion }}.|g' ./Directory.Build.props + sed -i -e '//,/<\/PackageReleaseNotes>/ s|/tag/[0-9a-zA-Z.|-]*|/tag/${{ inputs.release_version }}|g' ./Directory.Build.props cat ./Directory.Build.props - name: "Commit release version and create tag" run: | diff --git a/Allure.Reqnroll/Allure.Reqnroll.csproj b/Allure.Reqnroll/Allure.Reqnroll.csproj index e2f999b1..e931ddc5 100644 --- a/Allure.Reqnroll/Allure.Reqnroll.csproj +++ b/Allure.Reqnroll/Allure.Reqnroll.csproj @@ -1,12 +1,12 @@  + Allure.Reqnroll Allure.ReqnrollPlugin Allure.ReqnrollPlugin netstandard2.0 enable true - Allure.Reqnroll Maksim Stepanov Create beautiful reports from your Reqnroll tests. Allure-Color.png diff --git a/Allure.SpecFlow/Allure.SpecFlow.csproj b/Allure.SpecFlow/Allure.SpecFlow.csproj index b526f15b..75bf8c44 100644 --- a/Allure.SpecFlow/Allure.SpecFlow.csproj +++ b/Allure.SpecFlow/Allure.SpecFlow.csproj @@ -1,6 +1,7 @@  + Allure.SpecFlow Allure.SpecFlowPlugin Allure.SpecFlowPlugin netstandard2.0 diff --git a/Allure.Xunit/Allure.Xunit.csproj b/Allure.Xunit/Allure.Xunit.csproj index 94f89b9b..a7132c4b 100644 --- a/Allure.Xunit/Allure.Xunit.csproj +++ b/Allure.Xunit/Allure.Xunit.csproj @@ -1,7 +1,9 @@  + Allure.Xunit Allure.Xunit.reporters + Allure.Xunit netstandard2.0;netcoreapp3.1 true Shumakov Ivan @@ -10,10 +12,6 @@ $(PackageTags) xunit - - $(TargetsForTfmSpecificBuildOutput);PackAllureXunitReportersFiles - - @@ -24,7 +22,6 @@ - diff --git a/Directory.Build.props b/Directory.Build.props index 0d836d13..f9dd013d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,7 @@ README.md LICENSE allure - See the release notes here: https://github.com/allure-framework/allure-csharp/releases/tag/2.11.0. + https://github.com/allure-framework/allure-csharp/releases/tag/2.11.0 @@ -40,7 +40,7 @@ - + diff --git a/README.md b/README.md index 0f1f77e9..e910edcb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ | Package | Documentation | Author | Release | |:-----------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------|:-----------------------------------------------------------------------------------------------------------:| | [Allure.NUnit](Allure.NUnit) | [https://allurereport.org/docs/nunit/](https://allurereport.org/docs/nunit/) | [Nick Chursin](https://github.com/unickq) | [![Nuget](https://img.shields.io/nuget/v/Allure.NUnit)](https://www.nuget.org/packages/Allure.NUnit/) | -| [Allure.Reqnroll](Allure.Reqnroll) | [https://allurereport.org/docs/reqnroll/](https://allurereport.org/docs/reqnroll/) | Maksim Stepanov | [![Nuget](https://img.shields.io/nuget/v/Allure.Reqnroll)](https://www.nuget.org/packages/Allure.Reqnroll/) | +| [Allure.Reqnroll](Allure.Reqnroll) | In progress... | Maksim Stepanov | [![Nuget](https://img.shields.io/nuget/v/Allure.Reqnroll)](https://www.nuget.org/packages/Allure.Reqnroll/) | | [Allure.SpecFlow](Allure.SpecFlow) | [https://allurereport.org/docs/specflow/](https://allurereport.org/docs/specflow/) | Alexander Bakanov | [![Nuget](https://img.shields.io/nuget/v/Allure.SpecFlow)](https://www.nuget.org/packages/Allure.SpecFlow/) | | [Allure.Xunit](Allure.Xunit) | [https://allurereport.org/docs/xunit/](https://allurereport.org/docs/xunit/) | [Shumakov Ivan](https://github.com/IvanWR1995) | [![Nuget](https://img.shields.io/nuget/v/Allure.Xunit)](https://www.nuget.org/packages/Allure.Xunit/) | diff --git a/build/AspectInjector/linux-x64/AspectInjector b/build/AspectInjector/linux-x64/AspectInjector old mode 100644 new mode 100755