Skip to content

Commit 126ca50

Browse files
authored
Create nightly release on schedule (#3836)
<!-- Reference any GitHub issues resolved by this PR --> Closes #3829 ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [ ] Linked relevant issue - [ ] Updated relevant documentation - [ ] Added relevant tests - [ ] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md`
1 parent 1b4ae50 commit 126ca50

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
description: "Dry run"
88
type: boolean
99
default: true
10+
workflow_call:
11+
1012

1113
concurrency:
1214
group: ${{ github.workflow }}

.github/workflows/scheduled.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
- scripts/get_scarb_versions.sh
77
- .github/workflows/scheduled.yml
88
schedule:
9-
- cron: '0 0 * * 3,0'
9+
# Two schedules needed so we can distinguish between nightly and non-nightly runs
10+
- cron: '0 0 * * 0'
11+
- cron: '0 0 * * 3'
1012
workflow_dispatch:
1113

1214
jobs:
@@ -200,11 +202,19 @@ jobs:
200202
bin_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
201203
std_version: ${{ needs.get-version.outputs.version }}-test.${{ github.run_id }}
202204

205+
create-nightly-release:
206+
needs: [ test-binary ]
207+
# Creating a nightly release will trigger a Maat experiment for it as well
208+
# Publish nightly only on Sundays
209+
if: ${{ (github.event_name == 'schedule') && (github.event.schedule == '0 0 * * 0') }}
210+
secrets: inherit
211+
uses:
212+
./.github/workflows/nightly.yml
203213

204214
notify_if_failed:
205215
runs-on: ubuntu-latest
206216
if: always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule'
207-
needs: [ test-forge-unit-and-integration, test-forge-e2e, test-cast , build-plugin-binaries, build-binaries, publish-plugin, publish-std, test-binary ]
217+
needs: [ create-nightly-release, test-forge-unit-and-integration, test-forge-e2e, test-cast , build-plugin-binaries, build-binaries, publish-plugin, publish-std, test-binary ]
208218
steps:
209219
- name: Notify that the workflow has failed
210220
uses: slackapi/[email protected]

0 commit comments

Comments
 (0)