|
@@ -0,0 +1,34 @@
|
|
1
|
+#
|
|
2
|
+# bump-date.yml
|
|
3
|
+# Bump the distribution date once per day
|
|
4
|
+#
|
|
5
|
+
|
|
6
|
+name: Bump Distribution Date
|
|
7
|
+
|
|
8
|
+on:
|
|
9
|
+ schedule:
|
|
10
|
+ - cron: '0 0 * * *'
|
|
11
|
+
|
|
12
|
+jobs:
|
|
13
|
+ bump_date:
|
|
14
|
+
|
|
15
|
+ runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+ steps:
|
|
18
|
+
|
|
19
|
+ - name: Check out bugfix-2.0.x
|
|
20
|
+ uses: actions/checkout@v2
|
|
21
|
+ with:
|
|
22
|
+ ref: bugfix-2.0.x
|
|
23
|
+
|
|
24
|
+ - name: Bump Distribution Date
|
|
25
|
+ run: |
|
|
26
|
+ # Inline Bump Script
|
|
27
|
+ [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
|
|
28
|
+ DIST=$( date +"%Y-%m-%d" )
|
|
29
|
+ eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
|
|
30
|
+ git config user.name "${GITHUB_ACTOR}" && \
|
|
31
|
+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
|
|
32
|
+ git add . && \
|
|
33
|
+ git commit -m "[cron] Bump distribution date ($DIST)" && \
|
|
34
|
+ git push
|