From b7f16171ad143e3015745e86e1d7f72b127bfe84 Mon Sep 17 00:00:00 2001 From: Kieron Date: Tue, 9 Apr 2024 18:34:13 +0100 Subject: [PATCH 1/3] build: trying to fix versioning --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 853a59d5..8efdca52 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,9 +31,11 @@ jobs: create_version: runs-on: ubuntu-latest steps: - - uses: paulhatch/semantic-version@v5.3.0 + - uses: paulhatch/semantic-version@v5.4.0 name: version id: version + with: + debug: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c6a81f1ab9f47fb41a7671270b0ecfceb2cfe0a5 Mon Sep 17 00:00:00 2001 From: Kieron Date: Tue, 9 Apr 2024 18:38:31 +0100 Subject: [PATCH 2/3] build: fixing build --- .github/workflows/publish.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8efdca52..bb13ced1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,9 +28,13 @@ defaults: working-directory: src jobs: - create_version: + create_nuget: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Get all history to allow automatic versioning using MinVer + - uses: paulhatch/semantic-version@v5.4.0 name: version id: version @@ -38,15 +42,7 @@ jobs: debug: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - create_nuget: - runs-on: ubuntu-latest - needs: [ create_version ] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Get all history to allow automatic versioning using MinVer - + # Install the .NET SDK indicated in the global.json file - name: Setup .NET uses: actions/setup-dotnet@v4 From 038f015668e41553ae46b744ef33ad05e12dbbe6 Mon Sep 17 00:00:00 2001 From: Kieron Date: Tue, 9 Apr 2024 19:23:16 +0100 Subject: [PATCH 3/3] build: fixing build --- .github/workflows/publish.yml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bb13ced1..003a442c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,7 @@ on: env: POWERSHELL_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: true SolutionPath: ./Purview.Telemetry.SourceGenerator.sln @@ -38,8 +39,6 @@ jobs: - uses: paulhatch/semantic-version@v5.4.0 name: version id: version - with: - debug: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -48,7 +47,7 @@ jobs: uses: actions/setup-dotnet@v4 # Create the NuGet package in the folder from the environment variable NuGetDirectory - - run: dotnet pack ${{ env.SolutionPath }} --configuration ${{ env.BuildConfigutation }} --output ${{ env.NuGetDirectory }} --property:Version=${{ steps.version.output.version }} --include-symbols + - run: dotnet pack ${{ env.SolutionPath }} --configuration ${{ env.BuildConfigutation }} --output ${{ env.NuGetDirectory }} --property:Version=${{ steps.version.outputs.version }} --include-symbols # Publish the NuGet package as an artifact, so they can be used in the following jobs - uses: actions/upload-artifact@v4 @@ -58,31 +57,6 @@ jobs: retention-days: 7 path: ${{ env.NuGetDirectory }}/*.nupkg - # validate_nuget: - # runs-on: ubuntu-latest - # needs: [ create_nuget ] - # steps: - # # Install the .NET SDK indicated in the global.json file - # - name: Setup .NET - # uses: actions/setup-dotnet@v4 - - # # Download the NuGet package created in the previous job - # - uses: actions/download-artifact@v4 - # with: - # name: nuget - # path: ${{ env.NuGetDirectory }} - - # - name: Install nuget validator - # run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global - - # # Validate metadata and content of the NuGet package - # # https://www.nuget.org/packages/Meziantou.Framework.NuGetPackageValidation.Tool#readme-body-tab - # # If some rules are not applicable, you can disable them - # # using the --excluded-rules or --excluded-rule-ids option - # - name: Validate package - # working-directory: ${{ env.NuGetDirectory }} - # run: meziantou.validate-nuget-package (Get-ChildItem "*.nupkg") - run_test: runs-on: ubuntu-latest steps: @@ -98,7 +72,6 @@ jobs: # You can update this logic if you want to manage releases differently if: github.event_name == 'release' runs-on: ubuntu-latest - # needs: [ validate_nuget, run_test ] needs: [ run_test ] steps: # Download the NuGet package created in the previous job