Skip to content

[WIP] test github workflow for ter release-13 #21

[WIP] test github workflow for ter release-13

[WIP] test github workflow for ter release-13 #21

Workflow file for this run

name: TYPO3 Extension TER Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
name: Publish new version to TER
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
env:
TYPO3_EXTENSION_KEY: 'operations'
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check tag
run: |
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
exit 1
fi
- name: Get version
id: get-version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Get comment
id: get-comment
run: |
cd ${GITHUB_WORKSPACE}
echo "Fetching tag message for version: ${{ env.version }}" # Debugging line
tag_message=$(git tag -l --format='%(contents:subject) %(contents:body)' ${{ env.version }})
echo "Tag message: $tag_message" # Debugging line
if [[ -z "${tag_message// }" ]]; then
echo "comment=Released version ${{ env.version }} of ${{ env.TYPO3_EXTENSION_KEY }}" >> $GITHUB_ENV
else
{
echo 'comment<<EOF'
echo "$tag_message"
echo EOF
} >> "$GITHUB_ENV"
fi
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: 7.4
# extensions: intl, mbstring, json, zip, curl
# tools: composer:v2
#
# - name: Install tailor
# run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest
#
# - name: Publish to TER
# run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ env.comment }}" ${{ env.version }}