Skip to content

[BUGFIX] Use spread operator for where constraints #171

[BUGFIX] Use spread operator for where constraints

[BUGFIX] Use spread operator for where constraints #171

Workflow file for this run

name: TER deployment
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
branches-ignore:
- 'l10n_master'
jobs:
# Check if there is a valid tag
tag-valid:
name: Check for valid tag
# Run only if it's a tag in general (as regex is not possible here)
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
# Save status for use in other jobs
outputs:
status: ${{ steps.check-tag.outputs.match }}
steps:
# Check for a valid tag
- name: Check if trigger is a valid tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
# The actual TER upload job
ter-release:
name: TYPO3 TER release
# Depend on a valid tag
needs: tag-valid
if: needs.tag-valid.outputs.status == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.2]
env:
TYPO3_EXTENSION_KEY: t3extblog
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
path: ${{ env.TYPO3_EXTENSION_KEY }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, mbstring, json, zip, curl
tools: composer:v2
- name: Install TYPO3 TER client
run: composer global require typo3/tailor "^1.4" --prefer-dist --no-progress --no-suggest
- name: Remove .git folder
run: rm -rf ./$TYPO3_EXTENSION_KEY/.git
- name: List extension folder
run: ls -liAsh ./$TYPO3_EXTENSION_KEY
- name: Get version
id: get-version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Upload EXT:${{ env.TYPO3_EXTENSION_KEY }} as ${{ github.event.ref }} to TER
run: php ~/.composer/vendor/bin/tailor ter:publish --path="./$TYPO3_EXTENSION_KEY" --comment "${{ github.event.head_commit.message }}" ${{ steps.get-version.outputs.version }}