From 9e8987285193815c56857882c6d029a64fe1ec6e Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 1 Oct 2026 08:32:41 +0200 Subject: [PATCH] [TASK] Publish to TER Fixes: #32 --- .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c45c3a9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: publish + +on: + push: + tag: + +jobs: + publish: + name: Publish new version to TER + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + env: + TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }} + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - 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 ::set-output name=version::${GITHUB_REF/refs\/tags\//} + + - name: Get comment + id: get-comment + run: | + readonly local comment=$(git tag -n10 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g") + if [[ -z "${comment// }" ]]; then + echo ::set-output name=comment::Released version ${{ steps.get-version.outputs.version }} of permission-sets + else + echo ::set-output name=comment::$comment + fi + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + extensions: intl, mbstring, json, zip, curl + + - 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 "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }}