Skip to content

Commit 46ad9d3

Browse files
committed
Drive releases through a single orchestrator workflow
Drive releases through a single orchestrator workflow that: Keeps the nightly cron Offers manual dispatch inputs for dev/nightly/production Passes the production tag/base down to release-production.yml Without that orchestrator, the nightly job will stop running and dev/prod releases can’t be dispatched from the GitHub UI. Let me know if you’d like me to wire the orchestrator back up (or revert the individual workflow_dispatch blocks) so the previous scheduling behavior continues uninterrupted.
1 parent 76b8ea6 commit 46ad9d3

File tree

4 files changed

+60
-13
lines changed

4 files changed

+60
-13
lines changed

.github/workflows/release-dev.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: 'Stencil Dev Release'
22

33
on:
4-
workflow_dispatch:
5-
# Make this a reusable workflow, no value needed
6-
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
74
workflow_call:
85
outputs:
96
dev-version:
@@ -12,7 +9,6 @@ on:
129

1310
permissions:
1411
contents: read
15-
id-token: write
1612

1713
jobs:
1814
build_core:

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
name: 'Stencil Nightly Release'
22

33
on:
4-
schedule:
5-
# Run every Monday-Friday at 5:00 AM (UTC) (https://crontab.guru/#00_05_*_*_1-5)
6-
# This is done to have a nightly build ready for the Ionic Framework/Stencil Eval Workflow:
7-
# https://github.com/ionic-team/ionic-framework/blob/main/.github/workflows/stencil-eval.yml
8-
- cron: '00 05 * * 1-5'
9-
workflow_dispatch:
10-
# Allow this workflow to be run on-demand
4+
workflow_call:
115

126
permissions:
137
contents: read
14-
id-token: write
158

169
jobs:
1710
build_core:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: 'Stencil Release'
2+
3+
on:
4+
schedule:
5+
# Run every Monday-Friday at 5:00 AM (UTC)
6+
- cron: '00 05 * * 1-5'
7+
workflow_dispatch:
8+
inputs:
9+
release-type:
10+
description: 'Which Stencil release workflow should run?'
11+
required: true
12+
type: choice
13+
default: nightly
14+
options:
15+
- dev
16+
- nightly
17+
- production
18+
tag:
19+
description: 'npm tag for production releases.'
20+
required: false
21+
type: choice
22+
default: latest
23+
options:
24+
- dev
25+
- latest
26+
- use_pkg_json_version
27+
base:
28+
description: 'Base branch for production releases.'
29+
required: false
30+
type: choice
31+
default: main
32+
options:
33+
- main
34+
- v3-maintenance
35+
36+
permissions:
37+
contents: read
38+
id-token: write
39+
40+
jobs:
41+
run-nightly:
42+
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.release-type == 'nightly') }}
43+
uses: ./.github/workflows/release-nightly.yml
44+
secrets: inherit
45+
46+
run-dev:
47+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release-type == 'dev' }}
48+
uses: ./.github/workflows/release-dev.yml
49+
secrets: inherit
50+
51+
run-production:
52+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.release-type == 'production' }}
53+
uses: ./.github/workflows/release-production.yml
54+
secrets: inherit
55+
with:
56+
tag: ${{ inputs.tag }}
57+
base: ${{ inputs.base }}
58+

.github/workflows/release-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 'Stencil Production Release'
22
on:
3-
workflow_dispatch:
3+
workflow_call:
44
inputs:
55
tag:
66
required: false

0 commit comments

Comments
 (0)