From 8bd6ae43c8e79bf8e715f4857b4ae9a7ba388596 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 2 Mar 2022 09:07:44 -0800 Subject: Do NOT publish logs on `master` branch as they may contain secrets --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a2d0626..de2d426f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,13 +63,14 @@ jobs: shell: cmd run: wevtutil epl System build\logs\System.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]" + # Do NOT publish logs on `master` branch as they may contain secrets in them. - name: Save logs - if: always() + if: github.ref != 'refs/heads/master' && (success() || failure()) uses: actions/upload-artifact@v2 with: name: logs_${{ github.run_id }} path: build/logs/ - name: Push to GitHub Packages - if: ${{ github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') }} + if: github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') run: dotnet nuget push "build/artifacts/**/*.nupkg" --source https://nuget.pkg.github.com/wixtoolset/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate -- cgit v1.2.3-55-g6feb