Skip to content

Commit

Permalink
Merge pull request #25942 from storybookjs/jeppe/fix-gh-patch-prepara…
Browse files Browse the repository at this point in the history
…tion

Release tooling: Fix patch preparation not cancelling when no patches available
  • Loading branch information
JReinhold authored Feb 9, 2024
2 parents 9b750c2 + d56b95b commit 903317b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"

- name: Cache dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
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
if: steps.pick-patches.outputs.no-patch-prs == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# From https://stackoverflow.com/a/75809743
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
run: |
yarn release:write-changelog ${{ steps.versions.outputs.next }} --unpicked-patches --verbose
- name: 'Commit changes to branch: version-patch-from-${{ steps.versions.outputs.current }}'
- name: "Commit changes to branch: version-patch-from-${{ steps.versions.outputs.current }}"
working-directory: .
run: |
git config --global user.name 'storybook-bot'
Expand Down Expand Up @@ -185,4 +185,4 @@ jobs:
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 }}'
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 }}"
2 changes: 1 addition & 1 deletion scripts/release/pick-patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const run = async (_: unknown) => {
}

if (process.env.GITHUB_ACTIONS === 'true') {
setOutput('pr-count', JSON.stringify(patchPRs.length));
setOutput('no-patch-prs', patchPRs.length === 0);
setOutput('failed-cherry-picks', JSON.stringify(failedCherryPicks));
}
};
Expand Down

0 comments on commit 903317b

Please sign in to comment.