Skip to content

Commit

Permalink
Merge branch 'laravel:10.x' into 10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunate authored May 21, 2024
2 parents e50cbcc + 087bf14 commit f79eb98
Show file tree
Hide file tree
Showing 250 changed files with 5,606 additions and 1,073 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -40,8 +38,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down Expand Up @@ -74,8 +75,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -85,8 +84,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down Expand Up @@ -119,8 +121,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -130,8 +130,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down Expand Up @@ -165,8 +168,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -176,8 +177,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down Expand Up @@ -209,8 +213,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -220,8 +222,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/facades.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -30,8 +28,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ permissions:
pull-requests: write

jobs:
uneditable:
pull-requests:
uses: laravel/.github/.github/workflows/pull-requests.yml@main
32 changes: 18 additions & 14 deletions .github/workflows/queues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -30,8 +28,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand All @@ -53,8 +54,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -64,8 +63,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down Expand Up @@ -95,8 +97,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -106,8 +106,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand All @@ -126,12 +129,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/checkout@v3

- name: Download & Extract beanstalkd
run: curl -L https://github.com/beanstalkd/beanstalkd/archive/refs/tags/v1.13.tar.gz | tar xz

- name: Make beanstalkd
run: make
working-directory: beanstalkd-1.13
Expand All @@ -144,8 +145,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: manual release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

name: Release ${{ inputs.version }}

outputs:
version: ${{ steps.version.outputs.version }}
notes: ${{ steps.cleaned-notes.outputs.notes }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Remove optional "v" prefix
id: version
run: |
VERSION=${{ inputs.version }}
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
- name: Check if branch and version match
id: guard
run: |
MAJOR_VERSION="${NUMERIC_VERSION%%.*}"
BRANCH_MAJOR_VERSION="${BRANCH%%.*}"
echo "MAJOR_VERSION=$(echo $MAJOR_VERSION)" >> $GITHUB_OUTPUT;
echo "BRANCH_MAJOR_VERSION=$(echo $BRANCH_MAJOR_VERSION)" >> $GITHUB_OUTPUT;
if [ "$MAJOR_VERSION" != "$BRANCH_MAJOR_VERSION" ]; then
echo "Mismatched versions! Aborting."
VERSION_MISMATCH='true';
else
echo "Versions match! Proceeding."
VERSION_MISMATCH='false';
fi
echo "VERSION_MISMATCH=$(echo $VERSION_MISMATCH)" >> $GITHUB_OUTPUT;
env:
BRANCH: ${{ github.ref_name }}
NUMERIC_VERSION: ${{ steps.version.outputs.version }}

- name: Fail if branch and release tag do not match
if: ${{ steps.guard.outputs.VERSION_MISMATCH == 'true' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('Workflow failed. Release version does not match with selected target branch. Did you select the correct branch?')
- name: Update Application.php version
run: sed -i "s/const VERSION = '.*';/const VERSION = '${{ steps.version.outputs.version }}';/g" src/Illuminate/Foundation/Application.php

- name: Commit version change
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update version to v${{ steps.version.outputs.version }}"

- name: SSH into splitter server
uses: appleboy/ssh-action@master
with:
host: 104.248.56.26
username: forge
key: ${{ secrets.SSH_PRIVATE_KEY_SPLITTER }}
script: |
cd laravel-${{ github.ref_name }}
git pull origin ${{ github.ref_name }}
bash ./bin/release.sh v${{ steps.version.outputs.version }}
script_stop: true

- name: Generate release notes
id: generated-notes
uses: RedCrafter07/release-notes-action@main
with:
tag-name: v${{ steps.version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}

- name: Cleanup release notes
id: cleaned-notes
run: |
RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## What/d')
RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## New Contributors/,$d')
echo "notes=${RELEASE_NOTES}" >> "$GITHUB_OUTPUT"
env:
RELEASE_NOTES: ${{ steps.generated-notes.outputs.release-notes }}

- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
body: ${{ steps.cleaned-notes.outputs.notes }}
target_commitish: ${{ github.ref_name }}
make_latest: 'legacy'

update-changelog:
needs: release

name: Update changelog

uses: laravel/.github/.github/workflows/update-changelog.yml@main
with:
branch: ${{ github.ref_name }}
version: "v${{ needs.release.outputs.version }}"
notes: ${{ needs.release.outputs.notes }}
7 changes: 4 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -31,8 +29,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "10.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
Expand Down
Loading

0 comments on commit f79eb98

Please sign in to comment.