From 5c5301ab5640c69563899961d91c5473fffb892a Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sun, 3 Mar 2024 17:22:45 +0100 Subject: [PATCH] CI: modernize Add many non-push triggers (but only upload to nuget when it's a push to master). --- .github/workflows/CI.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ffe2c1e7f..cdb0f562d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,5 +1,14 @@ -name: ci -on: push +name: CI + +on: + push: + pull_request: + workflow_dispatch: + + # see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule + schedule: + # daily + - cron: "0 0 * * *" jobs: build_and_deploy: @@ -12,6 +21,7 @@ jobs: run: | dotnet build Nethereum.sln -p:Configuration=Release - name: Package and upload + if: github.event_name == 'push' && github.ref == 'refs/heads/master' run: | git clone https://github.com/nblockchain/fsx fsx\Tools\fsi.bat fsx\Tools\nugetPush.fsx $env:BASE_VERSION ${{secrets.NUGET_API_KEY}}