Skip to content

Commit

Permalink
Merge branch 'next' into fix-array-item-add
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen authored Jun 21, 2023
2 parents fa156df + 3899b2b commit 25d0cb5
Show file tree
Hide file tree
Showing 375 changed files with 6,612 additions and 4,060 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/check-release-tasks.yml

This file was deleted.

14 changes: 9 additions & 5 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
prepare-patch-pull-request:
name: Prepare patch pull request
runs-on: ubuntu-latest
environment: release
defaults:
run:
working-directory: scripts
Expand All @@ -27,6 +28,7 @@ jobs:
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
id: check-frozen
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:is-pr-frozen
run: yarn release:is-pr-frozen --patch

- name: Cancel when frozen
if: steps.check-frozen.outputs.frozen == 'true' && github.event_name != 'workflow_dispatch'
Expand Down Expand Up @@ -136,12 +138,13 @@ jobs:
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 }}" \
--title "Release: Patch ${{ 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 }}" \
--title "Release: Patch ${{ steps.versions.outputs.next }}" \
--label "maintenance" \
--base latest-release \
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
Expand All @@ -155,12 +158,13 @@ jobs:
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\`" \
--title "Release: Merge patches to \`main\` (without version bump)" \
--body "${{ steps.description.outputs.description }}"
else
gh pr create \
--repo "${{github.repository }}"\
--title "Merge patches to \`main\`" \
--title "Release: Merge patches to \`main\` (without version bump)" \
--label "build" \
--base latest-release \
--head version-patch-from-${{ steps.versions.outputs.current }} \
--body "${{ steps.description.outputs.description }}"
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/prepare-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
prepare-prerelease-pull-request:
name: Prepare prerelease pull request
runs-on: ubuntu-latest
environment: release
defaults:
run:
working-directory: scripts
Expand All @@ -48,6 +49,7 @@ jobs:
# this needs to be set to a high enough number that it will contain the last version tag
# as of May 2023, the whole repo had 55K commits
fetch-depth: 10000
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -136,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
15 changes: 13 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ jobs:

# tags are needed to get list of patches to label as picked
- name: Fetch git tags
if: github.ref_name == 'main-release'
if: github.ref_name == 'latest-release'
run: git fetch --tags origin

- name: Label patch PRs as picked
if: github.ref_name == 'main-release'
if: github.ref_name == 'latest-release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release:label-patches
Expand All @@ -119,6 +119,17 @@ jobs:
git merge ${{ github.ref_name }}
git push origin ${{ steps.target.outputs.target }}
- name: Sync CHANGELOG.md from `main` to `next`
if: github.ref_name == 'latest-release'
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 }}"
git push origin next
# Force push from next to main if it is not a prerelease, and this release is from next-release
# This happens when eg. next has been tracking 7.1.0-alpha.X, and now we want to release 7.1.0
# This will keep release-next, next and main all tracking v7.1.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-circle-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
branches:
- next
- main
- version-prerelease-from-**
- version-patch-from-**

jobs:
get-branch:
Expand Down
Loading

0 comments on commit 25d0cb5

Please sign in to comment.