Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dbb7557

Browse filesBrowse files
RafaelGSSruyadorno
authored andcommitted
build: add major release action
This action reminds collaborators of the upcoming major release date. In the future, this action can also update and create the branches (that's why the action name is generic). PR-URL: #56199 Refs: #55732 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent a648e4c commit dbb7557
Copy full SHA for dbb7557

File tree

Expand file treeCollapse file tree

1 file changed

+48
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+48
-0
lines changed
Open diff view settings
Collapse file
+48Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Major Release
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 15 2,8 * # runs at midnight UTC every 15 February and 15 August
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
create-issue:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
steps:
16+
- name: Check for release schedule
17+
id: check-date
18+
run: |
19+
# Get the current month and day
20+
MONTH=$(date +'%m')
21+
DAY=$(date +'%d')
22+
# We'll create the reminder issue two months prior the release
23+
if [[ "$MONTH" == "02" || "$MONTH" == "08" ]] && [[ "$DAY" == "15" ]]; then
24+
echo "create_issue=true" >> "$GITHUB_ENV"
25+
fi
26+
- name: Retrieve next major release info from nodejs/Release
27+
if: env.create_issue == 'true'
28+
run: |
29+
curl -L https://github.com/nodejs/Release/raw/HEAD/schedule.json | \
30+
jq -r 'to_entries | map(select(.value.start | strptime("%Y-%m-%d") | mktime > now)) | first | "VERSION=" + .key + "\nRELEASE_DATE=" + .value.start' >> "$GITHUB_ENV"
31+
- name: Compute max date for landing semver-major PRs
32+
if: env.create_issue == 'true'
33+
run: |
34+
echo "PR_MAX_DATE=$(date -d "$RELEASE_DATE -1 month" +%Y-%m-%d)" >> "$GITHUB_ENV"
35+
- name: Create release announcement issue
36+
if: env.create_issue == 'true'
37+
run: |
38+
gh issue create --repo "${GITHUB_REPOSITORY}" \
39+
--title "Upcoming Node.js Major Release ($VERSION)" \
40+
--body-file -<<EOF
41+
A reminder that the next Node.js **SemVer Major release** is scheduled for **${RELEASE_DATE}**.
42+
All commits that were landed until **${PR_MAX_DATE}** (one month prior to the release) will be included in the next semver major release. Please ensure that any necessary preparations are made in advance.
43+
For more details on the release process, consult the [Node.js Release Working Group repository](https://github.com/nodejs/release).
44+
45+
cc: @nodejs/collaborators
46+
EOF
47+
env:
48+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.