From 80189415c3694e4eb936ed84322b22ad1a46b4b3 Mon Sep 17 00:00:00 2001 From: Gandifil Date: Thu, 16 Mar 2023 20:16:22 +0100 Subject: [PATCH] Add checking event == 'push' --- .github/workflows/build-test-deploy.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index f14d9a04..0cdea9fe 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -31,11 +31,11 @@ jobs: - name: "Install GitVersion" uses: gittools/actions/gitversion/setup@v0.9.6 - env: + env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true # workaround for https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ until the execute action is updated with: versionSpec: '5.x' - + - name: "Use GitVersion" uses: gittools/actions/gitversion/execute@v0.9.6 @@ -103,13 +103,13 @@ jobs: run: dotnet test --nologo --verbosity normal --configuration Release --no-build - name: "Pack solution" - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' run: dotnet pack --nologo --output "./nuget-packages" --verbosity minimal --configuration Release --no-build -p:PackageVersion='${{ env.VERSION }}' - + - name: "Add Packages Source: MyGet" - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' run: dotnet nuget add source $MYGET_SOURCE_URL --name "MyGet" - + - name: "Upload Packages: MyGet" - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' run: dotnet nuget push "./**/*.nupkg" --source "MyGet" --skip-duplicate --api-key $MYGET_ACCESS_TOKEN