Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.RB_TOKEN }}

- name: Install system dependencies for Pillow
run: sudo apt-get update && sudo apt-get install -y libjpeg-dev zlib1g-dev

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.13'

Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Manually triggered workflow that plans a new stable release:
# - creates a branch from main
# - runs `just plan <next_stable_version> <cutoff-date> <node_version>`
# - runs `just backfill <next_stable_version> <first_patch_date>`
# - regenerates all derived files with `just`
# - pushes the branch and opens a PR against main

name: Plan release

on:
workflow_dispatch:
inputs:
release:
description: 'Release name (e.g. stable2606)'
required: true
type: string
node_version:
description: 'Node version (e.g. 1.25.0)'
required: true
type: string
cutoff-date:
description: 'Release cutoff date (YYYY-MM-DD) should be 1.5 months earlier than release date'
required: true
type: string
first-patch-date:
description: 'First patch release date (YYYY-MM-DD, must be a Monday) should be approx. 1 month after release date in a week where no releases are planned'
required: true
type: string

permissions:
contents: write
pull-requests: write

jobs:
plan-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.RB_TOKEN }}

- name: Install system dependencies for Pillow
run: sudo apt-get update && sudo apt-get install -y libjpeg-dev zlib1g-dev

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.13'

- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
with:
just-version: 1.35.0

- name: Create release branch
env:
RELEASE: ${{ inputs.release }}
run: |
git config user.email "action@github.com"
git config user.name "GitHub Action"
git checkout -b "plan-${RELEASE}"

- name: Plan release, backfill patches and regenerate files
env:
RELEASE: ${{ inputs.release }}
NODE_VERSION: ${{ inputs.node_version}}
CUTOFF_DATE: ${{ inputs.cutoff-date }}
FIRST_PATCH_DATE: ${{ inputs.first-patch-date }}
run: |
just plan "${RELEASE}" "${CUTOFF_DATE}" "${NODE_VERSION}"
just backfill "${RELEASE}" "${FIRST_PATCH_DATE}"
just

- name: Commit and push
env:
RELEASE: ${{ inputs.release }}
run: |
git add .
git commit -m "Plan ${RELEASE}"
git push --set-upstream origin "plan-${RELEASE}"

- name: Open pull request
env:
GH_TOKEN: ${{ secrets.RB_TOKEN }}
RELEASE: ${{ inputs.release }}
NODE_VERSION: ${{ inputs.node_version}}
CUTOFF_DATE: ${{ inputs.cutoff-date }}
FIRST_PATCH_DATE: ${{ inputs.first-patch-date }}
run: |
gh pr create \
--base main \
--head "plan-${RELEASE}" \
--title "Plan ${RELEASE}" \
--body "Plan and backfill for ${RELEASE} with node version ${NODE_VERSION} and cutoff date ${CUTOFF_DATE} and first patch date ${FIRST_PATCH_DATE}"
6 changes: 3 additions & 3 deletions .github/workflows/update-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Install system dependencies for Pillow
run: sudo apt-get update && sudo apt-get install -y libjpeg-dev zlib1g-dev

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.13'

- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff #v3.0.0
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
with:
just-version: 1.35.0

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ python3 scripts/manage.py backfill-patches stable2407 --start-date 2024-07-29

Then update the README to see the changes by running `just`.

Alternatively, this can be done entirely on GitHub: trigger the **Plan release** workflow (`.github/workflows/plan-release.yml`) from the Actions tab. It takes the release name, node version, cutoff date and first patch date as inputs, runs the `plan` and `backfill` commands, regenerates all derived files, and opens a PR against `main`.

### Release Cutoff / Publish

Run this command to cut off a release:
Expand All @@ -134,6 +136,8 @@ python3 scripts/manage.py release cutoff stable2407-2 2024-09-02

With `publish` likewise.

Publishing can also be done on GitHub: trigger the **New release** workflow (`.github/workflows/new-release.yml`) from the Actions tab. It takes the release name and date as inputs, runs the `publish` command, regenerates all derived files, and opens a PR against `main`.

## Automation

Two scripts are currently in place to:
Expand Down