Skip to content

Commit f5ceb97

Browse files
committed
Remove development dependencies when building release
Due to the way that distributions for Packagist needs to be configured, according to the Laravel Zero docs (https://laravel-zero.com/docs/build-a-standalone-application#distribute-via-packagist), all dependencies need to be dev-dependencies. This presents a problem. We don't want to include the actual development dependencies in the release. My best solution as of now is to simply remove them before building the release version. Sadly, this means we cannot cache the Composer packages for the job anymore. Fixes #26
1 parent a1d7253 commit f5ceb97

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/create-release.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ jobs:
3636
git fetch origin master:master
3737
git reset --hard master
3838
39-
- name: Cache Composer packages
40-
id: composer-cache
41-
uses: actions/cache@v3
42-
with:
43-
path: vendor
44-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
45-
restore-keys: |
46-
${{ runner.os }}-php-
39+
- name: Remove development dependencies
40+
run: |
41+
composer remove mockery/mockery --dev --no-install
42+
composer remove pestphp/pest --dev --no-install
4743
4844
- name: Install dependencies
4945
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist

0 commit comments

Comments
 (0)