Skip to content

Merge pull request #2 from andersundsehr/wip/lazy-data-processor #53

Merge pull request #2 from andersundsehr/wip/lazy-data-processor

Merge pull request #2 from andersundsehr/wip/lazy-data-processor #53

Workflow file for this run

name: Tasks
on: [push, pull_request]
jobs:
lint-php:
name: "php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3' ]
typo3: [ '11', '12' ]
exclude:
- php: '8.1'
typo3: '13'
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-composer-
- run: composer require typo3/minimal="^${{ matrix.typo3 }}" -W --dev
- run: composer install --no-interaction --no-progress
- run: ./vendor/bin/grumphp run --ansi
ter-release:
name: TER release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [ lint-php ]
env:
TYPO3_EXTENSION_KEY: 'ssi_include'
REPOSITORY_URL: 'https://github.com/andersundsehr/ssi_include'
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
TYPO3_API_USERNAME: ${{ secrets.TYPO3_API_USERNAME }}
TYPO3_API_PASSWORD: ${{ secrets.TYPO3_API_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: intl, mbstring, xml, soap, zip, curl
tools: composer
- name: Install typo3/tailor
run: composer global require typo3/tailor --prefer-dist --no-progress
- name: Upload EXT:ssi_include to TER
run: |
sed -i 's/\\AUS\\SsiInclude\\Utility\\VersionUtility::getVersion()/'\''${{ steps.get_version.outputs.VERSION }}'\''/g' ext_emconf.php \
&& git config --global user.email "no@one" \
&& git config --global user.name "No One" \
&& git add ext_emconf.php \
&& jq '.require = .["ter-require"]' composer.json > composer.json_tmp \
&& mv composer.json_tmp composer.json \
&& composer i --no-dev \
&& git add vendor -f \
&& git commit -m 'x' -n \
&& git archive -o archive.zip HEAD --prefix=ssi_include-${{ steps.get_version.outputs.VERSION }}/ \
&& git reset --hard HEAD~ \
&& curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/andersundsehr/ssi_include/releases/tags/${{ steps.get_version.outputs.VERSION }} > release.json \
&& php ~/.composer/vendor/bin/tailor ter:publish ${{ steps.get_version.outputs.VERSION }} --artefact=archive.zip \
--comment="$(cat release.json | jq -r '.name')
$(cat release.json | jq -r '.body')
$(cat release.json | jq -r '.html_url')"