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 f931af6 commit 3145f4f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: Build and deploy to NuGet
on: push

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 @@ -13,6 +22,7 @@ jobs:
run: |
dotnet build -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 3145f4f

Please sign in to comment.