Skip to content

Commit 7bccd3b

Browse files
committed
Merge branch 'trunk' into try/expanding-alignments-site-title-navigation
2 parents 7fe42a4 + 6562cad commit 7bccd3b

File tree

76 files changed

+2883
-1824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2883
-1824
lines changed

.github/workflows/build-plugin-zip.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,46 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21+
compute-stable-branches:
22+
name: Compute current and next stable release branches
23+
runs-on: ubuntu-latest
24+
outputs:
25+
current_stable_branch: ${{ steps.get_branches.outputs.current_stable_branch }}
26+
next_stable_branch: ${{ steps.get_branches.outputs.next_stable_branch }}
27+
steps:
28+
- name: Get current and next stable release branches
29+
id: get_branches
30+
run: |
31+
curl \
32+
-H "Accept: application/vnd.github.v3+json" \
33+
-o latest.json \
34+
"https://api.github.com/repos/${{ github.repository }}/releases/latest"
35+
LATEST_STABLE_TAG=$(jq --raw-output '.tag_name' latest.json)
36+
IFS='.' read LATEST_STABLE_MAJOR LATEST_STABLE_MINOR LATEST_STABLE_PATCH <<< "${LATEST_STABLE_TAG#v}"
37+
echo "::set-output name=current_stable_branch::release/${LATEST_STABLE_MAJOR}.${LATEST_STABLE_MINOR}"
38+
if [[ ${LATEST_STABLE_MINOR} == "9" ]]; then
39+
echo "::set-output name=next_stable_branch::release/$((LATEST_STABLE_MAJOR + 1)).0"
40+
else
41+
echo "::set-output name=next_stable_branch::release/${LATEST_STABLE_MAJOR}.$((LATEST_STABLE_MINOR + 1))"
42+
fi
43+
2144
bump-version:
2245
name: Bump version
2346
runs-on: ubuntu-latest
47+
needs: compute-stable-branches
2448
if: |
2549
github.repository == 'WordPress/gutenberg' &&
26-
github.event_name == 'workflow_dispatch' &&
27-
github.ref == 'refs/heads/trunk' && (
28-
github.event.inputs.version == 'rc' ||
29-
github.event.inputs.version == 'stable'
50+
github.event_name == 'workflow_dispatch' && (
51+
(
52+
github.ref == 'refs/heads/trunk' ||
53+
endsWith( github.ref, needs.compute-stable-branches.outputs.next_stable_branch )
54+
) && (
55+
github.event.inputs.version == 'rc' ||
56+
github.event.inputs.version == 'stable'
57+
) || (
58+
endsWith( github.ref, needs.compute-stable-branches.outputs.current_stable_branch ) &&
59+
github.event.inputs.version == 'stable'
60+
)
3061
)
3162
outputs:
3263
old_version: ${{ steps.get_version.outputs.old_version }}
@@ -91,13 +122,17 @@ jobs:
91122
sed -i "s/${{ steps.get_version.outputs.old_version }}/${VERSION}/g" gutenberg.php
92123
sed -i "s/${{ steps.get_version.outputs.old_version }}/${VERSION}/g" readme.txt
93124
94-
- name: Commit the version bump
125+
- name: Commit the version bump to the release branch
95126
run: |
96127
git add gutenberg.php package.json package-lock.json readme.txt
97128
git commit -m "Bump plugin version to ${{ steps.get_version.outputs.new_version }}"
98129
git push --set-upstream origin "${{ steps.get_version.outputs.release_branch }}"
99130
100-
- name: Cherry-pick to trunk
131+
- name: Fetch trunk
132+
if: ${{ github.ref != 'refs/heads/trunk' }}
133+
run: git fetch --depth=1 origin trunk
134+
135+
- name: Cherry-pick the version bump commit to trunk
101136
run: |
102137
git checkout trunk
103138
git pull

.github/workflows/bundle-size.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
path: ~/.npm
5656
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
5757

58-
- uses: preactjs/compressed-size-action@7d87f60a6b0c7d193b8183ce859ed00b356ea92f # v2.1.0
58+
- uses: preactjs/compressed-size-action@df6e03e187079aef959a2878311639c77b95ee2e # v2.2.0
5959
with:
6060
repo-token: '${{ secrets.GITHUB_TOKEN }}'
6161
pattern: '{build/**/*.min.js,build/**/*.css}'
62+
clean-script: 'distclean'

changelog.txt

Lines changed: 134 additions & 118 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)