Skip to content

Commit 79e5f51

Browse files
committed
Add a workflow to automatically bump the calendar version.
Note: This only does year & month, the patch is handled by the release script.
1 parent efa119d commit 79e5f51

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Automatic Calendar Version
2+
on:
3+
schedule:
4+
# At 03:00 UTC every Tuesday in preparation for an RC.
5+
# The tool assumes the release is published in 6-days (the following Monday).
6+
# Note: Most of these runs will be no-op until the release month changes.
7+
- cron: '0 3 * * 2'
8+
workflow_dispatch:
9+
10+
# Bumps the year and month, resetting the patch.
11+
# Patch bumps are handled by the release script.
12+
jobs:
13+
automatic-calendar-version:
14+
runs-on: macos-15
15+
# Skip in forks
16+
if: github.repository == 'element-hq/element-x-ios'
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup environment
22+
run:
23+
source ci_scripts/ci_common.sh && setup_github_actions_environment
24+
25+
- name: Bump the CalVer if needed
26+
run: swift run tools bump-calendar-version
27+
28+
- name: Create a PR for the new version
29+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8
30+
with:
31+
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
32+
author: ElementRobot <[email protected]>
33+
commit-message: Bump the calendar version ready for the next release
34+
title: Bump the calendar version ready for the next release
35+
body: |
36+
- Version bump
37+
labels: pr-build
38+
branch: version/bump
39+
base: develop
40+
add-paths: |
41+
*.yml
42+
*.xcodeproj

.github/workflows/translations-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8
3232
with:
3333
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
34+
author: ElementRobot <[email protected]>
3435
commit-message: Translations update
3536
title: Translations update
3637
body: |

0 commit comments

Comments
 (0)