Skip to content

Commit caab641

Browse files
committed
Support testing the release process on a schedule.
1 parent e141210 commit caab641

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/test_release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
type: string
99
required: true
1010
default: "0"
11+
schedule:
12+
# Run the second day of every month.
13+
- cron: "12 3 2 * *"
1114

1215
env:
1316
# Change these for your project's URLs
@@ -28,10 +31,19 @@ jobs:
2831
steps:
2932
- name: Set date suffix
3033
id: set-date
31-
run: echo "suffix=dev$(date +%Y%m%d)${{ github.event.inputs.iteration }}" >> $GITHUB_ENV
34+
run: echo "suffix=dev$(date +%Y%m%d)" >> $GITHUB_ENV
35+
- name: Determine Iteration Value
36+
id: set-iteration
37+
# If the action is running on a schedule, default iteration to 0
38+
run: |
39+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
40+
echo "iteration=${{ github.event.inputs.iteration }}" >> $GITHUB_ENV
41+
else
42+
echo "iteration=0" >> $GITHUB_ENV
43+
fi
3244
- name: Output dev version
3345
id: output-dev-version
34-
run: echo "dev_version=${{ env.suffix }}" >> "$GITHUB_OUTPUT"
46+
run: echo "dev_version=${{ env.suffix }}${{ env.iteration }}" >> "$GITHUB_OUTPUT"
3547

3648
build:
3749
name: Build distribution 📦

0 commit comments

Comments
 (0)