diff --git a/.gitattributes b/.gitattributes index 949650b4..a33e50e1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,13 +1,13 @@ * text=auto .github/ export-ignore +.run/ export-ignore +docs/ export-ignore tests/ export-ignore -.codecov.yml export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore -.scrutinizer.yml export-ignore -.styleci.yml export-ignore +package.json export-ignore phpunit.xml export-ignore diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 35a98d65..dfc1470e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,8 +1,6 @@ -name: Bug +name: Bug Report description: Report a bug or other issue -labels: '👓 needs review' - body: - type: markdown attributes: @@ -20,10 +18,10 @@ body: Tip: Use the `php artisan --version` command to get information for Laravel Framework. Tip: Use the `php -v` command to get information for PHP. value: | - - Migration Actions Version: - - Laravel Version: - PHP Version: - Database Driver & Version: + - Migration Actions Version: + - Laravel Version: validations: required: true @@ -50,4 +48,4 @@ body: - type: markdown attributes: value: | - ❤️ The Dragon Code? Please consider supporting our collective: https://opencollective.com/dragon-code + ❤️ The Dragon Code? Please consider supporting [`our collective`](https://opencollective.com/dragon-code). diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index bbaac841..751fd8f2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,17 +1,7 @@ name: Feature Proposal description: Propose a new feature -labels: - - '💪 feature request' - body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - ⚠️Review existing issues to see whether someone else has already reported your issue. - - type: textarea id: description attributes: @@ -23,23 +13,7 @@ body: validations: required: true - - type: textarea - id: environment - attributes: - label: Environment - description: | - Tip: Use the `composer info dragon-code/laravel-migration-actions` command to get information for Laravel Lang. - Tip: Use the `php artisan --version` command to get information for your application. - Tip: Use the `php -v` command to get information for PHP. - value: | - - Migration Actions Version: - - Laravel Version: - - PHP Version: - - Database Driver & Version: - validations: - required: false - - type: markdown attributes: value: | - ❤️ The Dragon Code? Please consider supporting our collective: https://opencollective.com/dragon-code + ❤️ The Dragon Code? Please consider supporting [`our collective`](https://opencollective.com/dragon-code). diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 00000000..3d6d3135 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,54 @@ +name: changelog + +on: + release: + types: + - released + +permissions: write-all + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json + coverage: none + + - name: Git setup + if: success() + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + + - name: Update + uses: stefanzweifel/changelog-updater-action@v1 + if: success() + with: + release-date: ${{ steps.release_date.outputs.date }} + release-notes: ${{ github.event.release.body }} + latest-version: ${{ github.event.release.tag_name }} + compare-url-target-revision: ${{ github.event.release.target_commitish }} + path-to-changelog: docs/prologue/changelog/3.x.md + + - name: Storing + id: changelog + if: success() + run: | + IS_DIRTY=1 + + { git add . && git commit -a -m "🧾 Update CHANGELOG"; } || IS_DIRTY=0 + + echo ::set-output name=is_dirty::${IS_DIRTY} + + - name: Push changes + uses: ad-m/github-push-action@master + if: success() && steps.changelog.outputs.is_dirty == 1 + with: + github_token: ${{ secrets.COMPOSER_TOKEN }} diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 00000000..665db2e4 --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,35 @@ +name: code-style + +on: + push: + pull_request: + +permissions: write-all + +jobs: + check: + if: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + + fix: + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Checking PHP Syntax + uses: TheDragonCode/codestyler@v2.6.2 + with: + github_token: ${{ secrets.COMPOSER_TOKEN }} + fix: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..577992dc --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,66 @@ +name: docs + +on: + push: + branches: + - main + workflow_run: + workflows: + - changelog + types: + - completed + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + generate: + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Pages + uses: actions/configure-pages@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + + - name: Cache dependencies + uses: actions/cache@v3 + id: npm-cache + with: + path: | + **/node_modules + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm i + + - name: Build VuePress site + run: npm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './docs/.vuepress/dist' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/laravel-6.yml b/.github/workflows/laravel-6.yml deleted file mode 100644 index 11a7b029..00000000 --- a/.github/workflows/laravel-6.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 6" -on: [ push ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0" ] - laravel: [ "6.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/laravel-7.yml deleted file mode 100644 index f1af2202..00000000 --- a/.github/workflows/laravel-7.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 7" -on: [ push ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0" ] - laravel: [ "7.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-8.yml b/.github/workflows/laravel-8.yml deleted file mode 100644 index b5ed48a4..00000000 --- a/.github/workflows/laravel-8.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Laravel 8" -on: [ push ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [ "7.3", "7.4", "8.0", "8.1" ] - laravel: [ "8.0" ] - - name: PHP ${{ matrix.php }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} - - - name: Execute tests - run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-9.yml b/.github/workflows/laravel.yml similarity index 59% rename from .github/workflows/laravel-9.yml rename to .github/workflows/laravel.yml index 508c7620..a1f4763c 100644 --- a/.github/workflows/laravel-9.yml +++ b/.github/workflows/laravel.yml @@ -1,4 +1,4 @@ -name: "Laravel 9" +name: laravel on: [ push ] jobs: @@ -9,9 +9,19 @@ jobs: fail-fast: true matrix: php: [ "8.0", "8.1" ] - laravel: [ "9.0" ] + laravel: [ "7.0", "8.0", "9.0" ] + prefer: [ "stable", "lowest" ] + exclude: + - laravel: "7.0" + php: "8.1" - name: PHP ${{ matrix.php }} + - laravel: "7.0" + php: "8.2" + + - laravel: "10.0" + php: "8.0" + + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} ${{ matrix.prefer }} steps: - name: Checkout code @@ -25,7 +35,7 @@ jobs: coverage: none - name: Install dependencies - run: composer require --dev laravel/framework:^${{ matrix.laravel }} + run: composer require --dev laravel/framework:^${{ matrix.laravel }} --prefer-${{ matrix.prefer }} - name: Execute tests run: sudo vendor/bin/phpunit diff --git a/.github/workflows/lint-check.yml b/.github/workflows/lint-check.yml deleted file mode 100644 index cf847b8d..00000000 --- a/.github/workflows/lint-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Code-Style Check" - -on: [ push, pull_request ] - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 diff --git a/.github/workflows/lint-fixer.yml b/.github/workflows/lint-fixer.yml deleted file mode 100644 index 1663da75..00000000 --- a/.github/workflows/lint-fixer.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Code-Style Fixer" - -on: - push: - branches: [ main ] - -jobs: - fix: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Checking PHP Syntax - uses: TheDragonCode/codestyler@v2.6.2 - with: - github_token: ${{ secrets.COMPOSER_TOKEN }} - fix: true diff --git a/.gitignore b/.gitignore index ba34f846..227cca8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,16 @@ .idea/ -vendor/ +_site/ build/ +node_modules/ +tmp/ +vendor/ + +.cache +.DS_Store +.env +.php_cs.cache +.phpintel +.temp *.bak *.cache @@ -8,3 +18,4 @@ build/ *.orig composer.lock +package-lock.json diff --git a/.run/build.run.xml b/.run/build.run.xml new file mode 100644 index 00000000..2c9d697a --- /dev/null +++ b/.run/build.run.xml @@ -0,0 +1,13 @@ + + + + + +