Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Patch 7.0.21 #23012

Merged
merged 32 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
40e1e88
Merge pull request #22992 from storybookjs/shilman/upgrade-playwright
ndelangen Jun 9, 2023
d09dda9
Merge pull request #22998 from storybookjs/norbert/playwright-fix
ndelangen Jun 9, 2023
b9bc611
Merge pull request #22996 from storybookjs/norbert/upgrade-addon-bench
ndelangen Jun 9, 2023
73ebe47
Merge pull request #22999 from storybookjs/kasper/playwright-main
kasperpeulen Jun 9, 2023
554e781
Merge pull request #22959 from storybookjs/new-release-tooling
kasperpeulen Jun 8, 2023
af1d234
Merge pull request #22990 from storybookjs/next-debug
JReinhold Jun 8, 2023
dde5e60
Merge pull request #22997 from storybookjs/fix-release-publish
JReinhold Jun 9, 2023
0eafd2d
Merge pull request #23003 from storybookjs/fix-publish-script
JReinhold Jun 9, 2023
7abe91b
Merge pull request #23004 from storybookjs/minor-release-fixes
JReinhold Jun 9, 2023
571eeb7
Merge pull request #23006 from storybookjs/use-token-for-publish
kasperpeulen Jun 9, 2023
85b2908
Merge pull request #23009 from storybookjs/escape-pr-description
kasperpeulen Jun 9, 2023
f5cf05f
Merge pull request #23008 from storybookjs/release-tooling-for-main
kasperpeulen Jun 9, 2023
ff75e20
Release tooling: Fix pick patches script to get the latest PRs
kasperpeulen Jun 13, 2023
1ca9621
Merge pull request #23046 from storybookjs/kasper/use-full-oid
kasperpeulen Jun 13, 2023
64cde8e
Merge pull request #23047 from storybookjs/kasper/compare-commits
kasperpeulen Jun 13, 2023
3c73620
Merge pull request #23066 from storybookjs/kasper/use-local-registry-…
kasperpeulen Jun 14, 2023
d09e3a1
Merge pull request #23071 from storybookjs/kasper/trigger-circle-ci-g…
kasperpeulen Jun 14, 2023
7ac2918
Merge pull request #22974 from MarioCadenas/fix/build-manager-path-ge…
ndelangen Jun 8, 2023
66f8fc1
Merge pull request #23016 from storybookjs/release-dependencies-label
JReinhold Jun 12, 2023
0b3a6c9
Merge pull request #22502 from storybookjs/feat/generate-files-later-…
yannbf Jun 13, 2023
d93779e
Merge pull request #22986 from storybookjs/simplify-migration-guide-cli
jonniebigodes Jun 13, 2023
aea6855
Merge pull request #22970 from storybookjs/api-reference-arg-types
kylegach Jun 13, 2023
9db12dc
Merge pull request #23058 from storybookjs/api-ref-doc-block-controls…
jonniebigodes Jun 13, 2023
bbfbe37
Merge pull request #23070 from storybookjs/norbert/angular-fix-16.1-s…
ndelangen Jun 14, 2023
c4eeadc
Merge pull request #23064 from storybookjs/norberyt/fix-angular-16-1
ndelangen Jun 14, 2023
d34cdcc
Merge pull request #23042 from storybookjs/fix/cli-rn-skip-ask-for-bu…
kasperpeulen Jun 14, 2023
01e60aa
Bump version from 7.0.20 to 7.0.21
github-actions[bot] Jun 14, 2023
ac1af48
Merge pull request #23051 from storybookjs/fix/viewports-e2e-test
shilman Jun 14, 2023
7e80bbd
Merge pull request #19183 from sonntag-philipp/sonntag-philipp/issues…
shilman Jun 9, 2023
7a44840
Merge pull request #22856 from storybookjs/chore_vet_outdated_refs_docs
jonniebigodes May 31, 2023
5f7ad9a
Merge pull request #22992 from storybookjs/shilman/upgrade-playwright
ndelangen Jun 9, 2023
9daeda4
Merge pull request #23015 from storybookjs/norbert/vue-component-type…
ndelangen Jun 9, 2023
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ executors:
default: 'small'
working_directory: /tmp/storybook
docker:
- image: mcr.microsoft.com/playwright:v1.32.3-focal
- image: mcr.microsoft.com/playwright:v1.35.0-focal
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/canary-release-pr.WIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Publish canary release of PR
run-name: 'Canary release: PR #${{ github.event.pull_request.number }} at ${{ github.sha }}'

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- next

env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
pull-requests: write

jobs:
release-canary:
name: Release canary version
runs-on: ubuntu-latest
environment: canary-release
defaults:
run:
working-directory: scripts
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1

- name: Install dependencies
working-directory: .
run: yarn task --task=install --start-from=install

- name: Set version
id: version
run: |
SHORT_SHA=$(git rev-parse --short ${{ github.sha }})
yarn release:version --release-type prerelease --pre-id pr-${{ github.event.pull_request.number }}-$SHORT_SHA --verbose

- name: Publish v${{ steps.version.outputs.next-version }}
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release:publish --tag pr-${{ github.event.pull_request.number }} --verbose

- name: Create comment on PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }}\
--repo "${{github.repository }}"\
--body "🚀 This pull request has been published as version \`${{ steps.version.outputs.next-version }}\` and with the tag \`pr-${{ github.event.pull_request.number }}\`.
[You can see it on the npm registry here](https://npmjs.com/package/@storybook/cli/v/${{ steps.version.outputs.next-version }})".

- name: Create failing comment on PR
if: failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }}\
--repo "${{github.repository }}"\
--body "Failed to publish canary version of this pul request. See the failed workflow run at See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

# - name: Report failure to Discord
# if: failure()
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
# uses: Ilshidur/action-discord@master
# with:
# args: 'The GitHub Action for publishing version ${{ steps.version.outputs.current-version }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
19 changes: 19 additions & 0 deletions .github/workflows/check-release-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check release tasks
run-name: 'Check tasks for "${{ github.event.pull_request.title }}" PR'

on:
pull_request:
types:
- opened
- edited
branches:
- 'latest-release'
- 'next-release'

jobs:
task-check:
runs-on: ubuntu-latest
steps:
- uses: chromaui/task-completed-checker-action@main
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
4 changes: 2 additions & 2 deletions .github/workflows/danger-js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
types: [opened, synchronize, reopened, labeled, unlabeled, edited]

name: Danger JS
jobs:
Expand All @@ -13,7 +13,7 @@ jobs:
node-version: '16'
- uses: actions/checkout@v3
- name: Danger JS
uses: danger/danger-js@10.9.0
uses: danger/danger-js@11.2.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
175 changes: 175 additions & 0 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
name: Prepare patch PR
run-name: Prepare patch PR, triggered by ${{ github.triggering_actor }}

on:
push:
branches:
- next
workflow_dispatch:

env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
prepare-patch-pull-request:
name: Prepare patch pull request
runs-on: ubuntu-latest
defaults:
run:
working-directory: scripts
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
ref: main

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1

- name: Install Dependencies
working-directory: .
run: |
yarn task --task=install

- name: Check if pull request is frozen
if: github.event_name != 'workflow_dispatch'
id: check-frozen
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:is-pr-frozen

- name: Cancel when frozen
if: steps.check-frozen.outputs.frozen == 'true' && github.event_name != 'workflow_dispatch'
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: Check for unreleased changes
id: unreleased-changes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:unreleased-changes-exists --unpicked-patches

- name: Fetch next branch
run:
# depth needs to be set to a high enough number that it will contain all the merge commits to cherry-pick
# as of May 2023, the whole repo had 55K commits
git fetch --depth=2000 origin next

- name: Pick patches
id: pick-patches
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
yarn release:pick-patches

- name: Bump version
id: bump-version
if: steps.unreleased-changes.outputs.has-changes-to-release == 'true'
run: |
yarn release:version --release-type patch --verbose

# We need the current version to set the branch name, even when not bumping the version
- name: Get current version
id: current-version
if: steps.unreleased-changes.outputs.has-changes-to-release == 'false'
run: |
yarn release:get-current-version --verbose

- name: Set version output
id: versions
run: |
echo "current=${{ steps.bump-version.outputs.current-version || steps.current-version.outputs.current-version }}" >> "$GITHUB_OUTPUT"
echo "next=${{ steps.bump-version.outputs.next-version || steps.current-version.outputs.current-version }}" >> "$GITHUB_OUTPUT"

- name: Write changelog
if: steps.unreleased-changes.outputs.has-changes-to-release == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn release:write-changelog ${{ steps.versions.outputs.next }} --unpicked-patches --verbose

- name: 'Commit changes to branch: version-patch-from-${{ steps.versions.outputs.current }}'
working-directory: .
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b version-patch-from-${{ steps.versions.outputs.current }}
git add .
git commit -m "Bump version from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" || true
git push --force origin version-patch-from-${{ steps.versions.outputs.current }}

- name: Generate PR description
id: description
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:generate-pr-description --unpicked-patches --manual-cherry-picks='${{ steps.pick-patches.outputs.failed-cherry-picks }}' ${{ steps.unreleased-changes.outputs.has-changes-to-release == 'true' && format('{0}={1} {2}={3}', '--current-version', steps.versions.outputs.current, '--next-version', steps.versions.outputs.next) || '' }} --verbose

- name: Create or update pull request with release
if: steps.unreleased-changes.outputs.has-changes-to-release == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if PR_STATE=$(gh pr view --json state --jq .state 2>/dev/null) && [[ -n "$PR_STATE" && "$PR_STATE" == *"OPEN"* ]]; then
gh pr edit \
--repo "${{github.repository }}" \
--title "Bump version on \`main\`: patch from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}" \
--title "Bump version on \`main\`: patch from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" \
--base latest-release \
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
fi

- name: Create or update pull request without release
if: steps.unreleased-changes.outputs.has-changes-to-release == 'false'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if PR_STATE=$(gh pr view --json state --jq .state 2>/dev/null) && [[ -n "$PR_STATE" && "$PR_STATE" == *"OPEN"* ]]; then
gh pr edit \
--repo "${{github.repository }}"\
--title "Merge patches to \`main\`" \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Merge patches to \`main\`" \
--base latest-release \
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
fi

- name: Report job failure to Discord
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_MONITORING_URL }}
uses: Ilshidur/action-discord@master
with:
args: 'The GitHub Action for preparing the release pull request bumping from v${{ steps.versions.outputs.current }} to v${{ steps.versions.outputs.next }} (triggered by ${{ github.triggering_actor }}) failed! See run at: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
Loading