Skip to content

Commit fd751db

Browse files
LizardByte-botc2vi
authored andcommitted
chore: update global workflows (LizardByte#3551)
1 parent 04e6c53 commit fd751db

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release-notifier.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ jobs:
7070
tag_name="${{ github.event.release.tag_name }}"
7171
semver="${tag_name#v}"
7272
repo_lower="$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')"
73-
file_name="_posts/releases/${repo_lower}/${semver//./-}.md"
73+
74+
# extract year, month, and day
75+
year="${semver%%.*}"
76+
month_day="${semver#*.}"
77+
month_day="${month_day%%.*}"
78+
79+
# ensure month_day is 4 digits
80+
month_day=$(printf "%04d" "$month_day")
81+
82+
# create the filename
83+
file_name="_posts/releases/${year}-${month_day:0:2}-${month_day:2:2}-v${semver}.md"
7484
mkdir -p "$(dirname "${file_name}")"
7585
7686
# create jekyll blog post

0 commit comments

Comments
 (0)