Update composer.json #260
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 | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
git config --global url."https://github.com/".insteadOf | |
ssh://[email protected]/ | |
- name: Setup ruby | |
uses: actions/setup-ruby@master | |
- name: Setup PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: '8.1' | |
extensions: mbstring | |
- name: install composer dependencies | |
run: composer install | |
- name: Setup node | |
uses: actions/setup-node@master | |
with: | |
node-version: 12 | |
- name: install npm dependencies | |
run: npm ci | |
- name: Setup sass | |
run: npm install -g sass | |
- name: build dist files | |
run: grunt build | |
- name: Start the stack | |
run: | | |
docker-compose up --build -d apache | |
docker-compose logs | |
docker ps | |
- name: Execute tests | |
run: | | |
node tests/bootstrap.js --delay=30000 | |
docker-compose logs | |
- name: remove dev npm dependencies | |
if: startsWith(github.ref, 'refs/tags/') | |
run: npm prune --production | |
- name: remove dev composer dependencies | |
if: startsWith(github.ref, 'refs/tags/') | |
run: composer install --no-dev -o | |
- name: Create Release | |
id: create_release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/create-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Create Release Asset | |
if: startsWith(github.ref, 'refs/tags/') | |
run: zip -r build.zip . | |
- name: Upload Release Asset | |
id: upload-release-asset | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-release-asset@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build.zip | |
asset_name: build.zip | |
asset_content_type: application/zip |