Skip to content

Commit

Permalink
CI: modernize
Browse files Browse the repository at this point in the history
Add many non-push triggers (but only upload to nuget when
it's a push to master).
  • Loading branch information
knocte committed Mar 3, 2024
1 parent d9947cb commit 5c5301a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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}}

0 comments on commit 5c5301a

Please sign in to comment.