Skip to content

Commit

Permalink
Merge pull request #23099 from storybookjs/fix-release-workflow
Browse files Browse the repository at this point in the history
Release: Changes to release PR titles and content
  • Loading branch information
JReinhold authored Jun 15, 2023
2 parents 9ab5e17 + 19b3201 commit 92885b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ jobs:
gh pr create \
--repo "${{github.repository }}" \
--title "Release: Patch ${{ steps.versions.outputs.next }}" \
--label "maintenance" \
--base latest-release \
--label "maintenance"
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
fi
Expand All @@ -164,8 +164,8 @@ jobs:
gh pr create \
--repo "${{github.repository }}"\
--title "Release: Merge patches to \`main\` (without version bump)" \
--base latest-release \
--label "build" \
--base latest-release \
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
fi
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/prepare-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,18 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TYPE=${{ inputs.release-type || 'prerelease' }}
CAPITALIZED_RELEASE_TYPE=${RELEASE_TYPE^}
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 \`next\`: ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('({0})', inputs.pre-id) }} from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" \
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Bump version on \`next\`: ${{ inputs.release-type || 'prerelease' }} ${{ inputs.pre-id && format('({0})', inputs.pre-id) }} from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" \
--title "Release: $CAPITALIZED_RELEASE_TYPE ${{ inputs.pre-id && format('{0} ', inputs.pre-id) }}${{ steps.bump-version.outputs.next-version }}" \
--label "maintenance" \
--base next-release \
--head version-prerelease-from-${{ steps.bump-version.outputs.current-version }} \
--body "${{ steps.description.outputs.description }}"
Expand Down
1 change: 1 addition & 0 deletions scripts/release/generate-pr-description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const CHANGE_TITLES_TO_IGNORE = [
/\[skip ci\]/i,
/\[ci skip\]/i,
/^Update CHANGELOG\.md for.*/i,
/^Release: (Pre)?(Patch|Minor|Major|Release).*\d+$/i,
];

export const mapToChangelist = ({
Expand Down

0 comments on commit 92885b3

Please sign in to comment.