Skip to content

Commit

Permalink
Merge branch 'next' into fix-select-double-spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen authored Oct 9, 2023
2 parents 8dc11d5 + 64e1ac9 commit 05eb71f
Show file tree
Hide file tree
Showing 164 changed files with 2,286 additions and 1,507 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,27 +555,27 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 20
parallelism: 21
requires:
- build
- build-sandboxes:
parallelism: 20
parallelism: 21
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 17
parallelism: 18
requires:
- build-sandboxes
- e2e-production:
parallelism: 17
parallelism: 18
requires:
- build-sandboxes
- e2e-dev:
parallelism: 4
requires:
- create-sandboxes
- test-runner-production:
parallelism: 17
parallelism: 18
requires:
- build-sandboxes
- bench:
Expand Down Expand Up @@ -609,30 +609,30 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 33
parallelism: 34
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 33
parallelism: 34
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 30
parallelism: 31
requires:
- build-sandboxes
- e2e-production:
parallelism: 30
parallelism: 31
requires:
- build-sandboxes
- e2e-dev:
parallelism: 4
requires:
- create-sandboxes
- test-runner-production:
parallelism: 30
parallelism: 31
requires:
- build-sandboxes
# TODO: reenable once we find out the source of flakyness
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Prepare prerelease PR
run-name: Prepare prerelease PR, triggered by ${{ github.triggering_actor }}
name: Prepare non-patch PR
run-name: Prepare non-patch PR, triggered by ${{ github.triggering_actor }}

on:
push:
Expand Down Expand Up @@ -34,8 +34,8 @@ concurrency:
cancel-in-progress: true

jobs:
prepare-prerelease-pull-request:
name: Prepare prerelease pull request
prepare-non-patch-pull-request:
name: Prepare non-patch pull request
runs-on: ubuntu-latest
environment: release
defaults:
Expand Down Expand Up @@ -112,21 +112,37 @@ jobs:
run: |
yarn release:version --deferred --release-type ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('{0} {1}', '--pre-id', inputs.pre-id) || '' }} --verbose
- name: Check release vs prerelease
id: is-prerelease
run: yarn release:is-prerelease

- name: Write changelog
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn release:write-changelog ${{ steps.bump-version.outputs.next-version }} --verbose
- name: 'Commit changes to branch: version-prerelease-from-${{ steps.bump-version.outputs.current-version }}'
- name: 'Commit changes to branch: version-non-patch-from-${{ steps.bump-version.outputs.current-version }}'
working-directory: .
run: |
git config --global user.name 'storybook-bot'
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
git checkout -b version-prerelease-from-${{ steps.bump-version.outputs.current-version }}
git checkout -b version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
git add .
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }} [skip ci]" || true
git push --force origin version-non-patch-from-${{ steps.bump-version.outputs.current-version }}
- name: Resolve merge-conflicts with base branch
if: steps.is-prerelease.outputs.prerelease == 'false'
working-directory: .
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config pull.rebase false
git pull --no-commit --no-ff origin latest-release || true
git checkout --ours .
git add .
git commit -m "Write changelog for ${{ steps.bump-version.outputs.next-version }}" || true
git push --force origin version-prerelease-from-${{ steps.bump-version.outputs.current-version }}
git commit --no-verify -m "Merge latest-release into version-non-patch-from-${{ steps.bump-version.outputs.current-version }} with conflicts resolved to ours [skip ci]"
- name: Generate PR description
id: description
Expand All @@ -144,14 +160,15 @@ jobs:
gh pr edit \
--repo "${{github.repository }}" \
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--label "release" \
--base next-release \
--head version-prerelease-from-${{ steps.bump-version.outputs.current-version }} \
--base ${{ steps.is-prerelease.outputs.prerelease == 'true' && 'next-release' || 'latest-release' }} \
--head version-non-patch-from-${{ steps.bump-version.outputs.current-version }} \
--body "${{ steps.description.outputs.description }}"
fi
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ jobs:
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
yarn release:pick-patches
- name: Cancel when no patches to pick
if: steps.pick-patches.outputs.pr-count == '0' && steps.pick-patches.outputs.pr-count != null
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# From https://stackoverflow.com/a/75809743
run: |
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
- name: Bump version deferred
id: bump-version
if: steps.unreleased-changes.outputs.has-changes-to-release == 'true'
Expand Down Expand Up @@ -121,7 +130,7 @@ jobs:
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
git checkout -b version-patch-from-${{ steps.versions.outputs.current }}
git add .
git commit -m "Write changelog for ${{ steps.versions.outputs.next }}" || true
git commit -m "Write changelog for ${{ steps.versions.outputs.next }} [skip ci]" || true
git push --force origin version-patch-from-${{ steps.versions.outputs.current }}
- name: Generate PR description
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
- name: Cancel all release preparation runs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:cancel-preparation-runs

- name: Checkout ${{ github.ref_name }}
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -63,7 +68,6 @@ jobs:
yarn install
- name: Apply deferred version bump and commit
id: version-bump
working-directory: .
run: |
CURRENT_VERSION=$(cat ./code/package.json | jq '.version')
Expand Down Expand Up @@ -122,12 +126,11 @@ jobs:
run: git fetch --tags origin

# when this is a patch release from main, label any patch PRs included in the release
# when this is a stable release from next, label ALL patch PRs found, as they will per definition be "patched" now
- name: Label patch PRs as picked
if: github.ref_name == 'latest-release' || (steps.publish-needed.outputs.published == 'false' && steps.target.outputs.target == 'next' && !steps.is-prerelease.outputs.prerelease)
if: github.ref_name == 'latest-release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:label-patches ${{ steps.target.outputs.target == 'next' && '--all' || '' }}
run: yarn release:label-patches

- name: Create GitHub Release
if: steps.publish-needed.outputs.published == 'false'
Expand All @@ -151,16 +154,28 @@ jobs:
git merge ${{ github.ref_name }}
git push origin ${{ steps.target.outputs.target }}
- name: Ensure `next` is a minor version ahead of `main`
if: steps.target.outputs.target == 'main'
run: |
git checkout next
git pull
yarn release:ensure-next-ahead --main-version "${{ steps.version.outputs.current-version }}"
git add ..
git commit -m "Bump next to be one minor ahead of main [skip ci]"
git push origin next
- name: Sync CHANGELOG.md from `main` to `next`
if: github.ref_name == 'latest-release'
if: steps.target.outputs.target == 'main'
working-directory: .
run: |
git fetch origin next
git checkout next
git pull
git checkout origin/main ./CHANGELOG.md
git add ./CHANGELOG.md
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]"
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" || true
git push origin next
- name: Sync version JSONs from `next-release` to `main`
Expand All @@ -176,10 +191,6 @@ jobs:
git commit -m "Update $VERSION_FILE for v${{ steps.version.outputs.current-version }}"
git push origin main
- name: Overwrite main with next
if: steps.target.outputs.target == 'next' && steps.is-prerelease.outputs.prerelease == 'false'
run: git push --force origin next:main

- name: Report job failure to Discord
if: failure()
env:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 7.4.6

- CLI: Fix Nextjs project detection - [#24346](https://github.com/storybookjs/storybook/pull/24346), thanks [@yannbf](https://github.com/yannbf)!
- Core: Fix missing favicon during dev - [#24356](https://github.com/storybookjs/storybook/pull/24356), thanks [@ndelangen](https://github.com/ndelangen)!

## 7.4.5

- UI: Fix infinite hook call causing browsers to freeze - [#24291](https://github.com/storybookjs/storybook/pull/24291), thanks [@yannbf](https://github.com/yannbf)!
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 7.5.0-alpha.4

- CLI: Fix Nextjs project detection - [#24346](https://github.com/storybookjs/storybook/pull/24346), thanks [@yannbf](https://github.com/yannbf)!
- Core: Deprecate `storyStoreV6` (including `storiesOf`) and `storyIndexers` - [#23938](https://github.com/storybookjs/storybook/pull/23938), thanks [@JReinhold](https://github.com/JReinhold)!
- Core: Fix Promise cycle bug in useSharedState - [#24268](https://github.com/storybookjs/storybook/pull/24268), thanks [@ndelangen](https://github.com/ndelangen)!
- Core: Fix missing favicon during dev - [#24356](https://github.com/storybookjs/storybook/pull/24356), thanks [@ndelangen](https://github.com/ndelangen)!
- NextJS: Change babel plugins from `proposal-...` to `transform-...` - [#24290](https://github.com/storybookjs/storybook/pull/24290), thanks [@roottool](https://github.com/roottool)!
- Nextjs: Improve support for Windows-style paths - [#23695](https://github.com/storybookjs/storybook/pull/23695), thanks [@T99](https://github.com/T99)!
- UI: Fix infinite hook call causing browsers to freeze - [#24291](https://github.com/storybookjs/storybook/pull/24291), thanks [@yannbf](https://github.com/yannbf)!
- UI: Improve contrast ratio between focus / hover - [#24205](https://github.com/storybookjs/storybook/pull/24205), thanks [@chocoscoding](https://github.com/chocoscoding)!
- Vite: Move mdx-plugin from @storybook/builder-vite to @storybook/addon-docs - [#24166](https://github.com/storybookjs/storybook/pull/24166), thanks [@bryanjtc](https://github.com/bryanjtc)!

## 7.5.0-alpha.3

- Build: Filter some manager errors - [#24217](https://github.com/storybookjs/storybook/pull/24217), thanks [@yannbf](https://github.com/yannbf)!
Expand Down
Loading

0 comments on commit 05eb71f

Please sign in to comment.