Do NOT publish logs on `master` branch as they may contain secrets
Rob Mensching committed
Mar 2, 2022 at 09:07 UTC
8bd6ae43c8e79bf8e715f4857b4ae9a7ba388596
1 file changed
+3
-2
.github/workflows/build.yml
+3
-2
@@ -63,13 +63,14 @@ jobs:
63
shell: cmd
64
run: wevtutil epl System build\logs\System.evtx /q:"Event/System/TimeCreated[timediff(@SystemTime) <= 86400000]"
65
66
+ # Do NOT publish logs on `master` branch as they may contain secrets in them.
67
- name: Save logs
67
- if: always()
68
+ if: github.ref != 'refs/heads/master' && (success() || failure())
69
uses: actions/upload-artifact@v2
70
with:
71
name: logs_${{ github.run_id }}
72
path: build/logs/
73
74
- name: Push to GitHub Packages
74
- if: ${{ github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') }}
75
+ if: github.event_name == 'push' && github.repository_owner == 'wixtoolset' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
76
run: dotnet nuget push "build/artifacts/**/*.nupkg" --source https://nuget.pkg.github.com/wixtoolset/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate