Skip to content

Commit

Permalink
build: create 11.x.x LTS branch
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhwhite committed Jan 7, 2025
1 parent 732bfd8 commit 4e23c3f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types:
- closed
branches:
- 8.x.x
- '[0-9]+.x.x'

env:
TARGET_BRANCH: main
Expand All @@ -15,20 +15,20 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.TARGET_BRANCH }}
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
id: setup-node
with:
node-version-file: '.nvmrc'

- name: Cache node modules
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup-node.outputs.node-version }}-modules-${{ hashFiles('package-lock.json') }}
Expand All @@ -38,9 +38,11 @@ jobs:
run: npm ci

- name: Cherry pick
id: cherry-pick
run: |
git config user.name 'Blackbaud Sky Build User'
git config user.email '[email protected]'
# Set the git user to the author of the merge commit.
git config user.name "$(git log -1 --pretty=format:'%an' ${{ github.event.pull_request.merge_commit_sha }})"
git config user.email "$(git log -1 --pretty=format:'%ae' ${{ github.event.pull_request.merge_commit_sha }})"
# Echo commands to the log.
set -x
Expand Down Expand Up @@ -71,15 +73,18 @@ jobs:
echo "CHERRY_PICK_RESULT=failed" >> $GITHUB_ENV
exit 0
fi
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

- uses: actions/github-script@v6
- uses: actions/github-script@v7
if: ${{ env.CHERRY_PICK_RESULT != 'failed' }}
with:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
script: |
const pr = context.payload.pull_request;
const title = ${{ toJson(steps.cherry-pick.outputs.commit_message) }};
let body = `:cherries: Cherry picked from #${pr.number} [${pr.title}](${pr.html_url})`
const prAzureBoardLink = pr.body?.match(/(?<=\[)AB#\d+(?=])/g);
if (prAzureBoardLink) {
Expand All @@ -90,7 +95,7 @@ jobs:
repo: context.repo.repo,
head: process.env.CHERRY_PICK_BRANCH,
base: process.env.TARGET_BRANCH,
title: `${pr.title} (#${pr.number})`,
title,
body
}).then(result => {
console.log(`Created PR #${result.data.number}: ${result.data.html_url}`);
Expand Down Expand Up @@ -120,7 +125,7 @@ jobs:
- name: Comment on the original PR when cherry-pick is successful
if: ${{ env.CHERRY_PICK_RESULT == 'success' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
script: |
Expand All @@ -133,7 +138,7 @@ jobs:
- name: Comment on the original PR when cherry-pick fails
if: ${{ env.CHERRY_PICK_RESULT != 'success' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- main
- 11.x.x
pull_request:

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- 11.x.x
env:
# Set to 'alpha', 'beta', or 'rc' to create a prerelease.
PRERELEASE: 'false'
Expand Down
2 changes: 1 addition & 1 deletion .skyuxdev.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseBranch": "main",
"baseBranch": "11.x.x",
"documentationExcludeProjects": [
"clipboard",
"code-block",
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"affected": {
"defaultBase": "main"
"defaultBase": "11.x.x"
},
"tasksRunnerOptions": {
"default": {
Expand Down

0 comments on commit 4e23c3f

Please sign in to comment.