Release 1.6.0 #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
install_dev: | |
name: Install Dev Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# ----------------------------------- | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
# ----------------------------------- | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
# ----------------------------------- | |
- name: Install Dependencies | |
run: make dev -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
syntax_checks: | |
name: Syntax Checks | |
needs: install_dev | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# ----------------------------------- | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
# ----------------------------------- | |
- name: PHP Syntax Checks | |
run: make phpcheck -B | |
phpunit: | |
name: PHPUnit | |
needs: install_dev | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
- name: Run PHPUnit | |
run: make phpunit -B | |
phpstan: | |
name: PHPStan | |
needs: install_dev | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
- name: Run PHPStan | |
run: make stan -B | |
csfixer: | |
name: CS Fixer | |
needs: install_dev | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Mount Dev Dependency Cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-dev-dependencies-${{ github.run_id }} | |
path: | | |
vendor | |
- name: Run CS Fixer | |
run: make csfix -B | |
# ------------------------------------------------------------------------------------------------------------------------ | |
build: | |
name: Build ZIP File | |
runs-on: ubuntu-latest | |
needs: [ syntax_checks, phpunit, phpstan, csfixer ] | |
steps: | |
- name: Clone Code | |
uses: actions/checkout@v4 | |
- name: Build ZIP File | |
run: | | |
make release -B | |
- name: Extract ZIP file for artifact | |
shell: bash | |
run: | | |
unzip ./.build/AIDemoData.zip -d ./.build/extension | |
- name: Store ZIP file in Github | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AIDemoData | |
retention-days: 4 | |
path: ./.build/extension | |
- name: Delete TMP files | |
shell: bash | |
run: | | |
rm -rf ./.build/extension | |
# ------------------------------------------------------------------------------------------------------------------------ | |
packagist: | |
name: Update Packagist | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
# ----------------------------------- | |
- uses: actions/checkout@v4 | |
# ----------------------------------- | |
- name: Invoke Packagist Webhook | |
run: | | |
curl -XPOST -H'content-type:application/json' 'https://packagist.org/api/update-package?username=${{ secrets.PACKAGIST_USER }}&apiToken=${{ secrets.PACKAGIST_TOKEN }}' -d'{"repository":{"url":"https://packagist.org/packages/boxblinkracer/shopware-ai-demodata"}}' |