diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..520adc2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,53 @@ +name: publish + +on: + push: + tags: + - '*' + +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@v6 + + - 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_OUTPUT" + + - name: Get comment + id: get-comment + run: | + comment=$(git tag -n10 -l "${{ steps.get-version.outputs.version }}" | sed "s/^[0-9.]*[ ]*//g") + if [[ -z "${comment// }" ]]; then + comment="Released version ${{ steps.get-version.outputs.version }}" + fi + { + echo "comment<> "$GITHUB_OUTPUT" + + - 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 }} diff --git a/composer.json b/composer.json index f837402..ecf9e78 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "typo3/cms": { "web-dir": ".Build/Web", "extension-key": "backendpreviews", - "version": "1.5.2", + "version": "1.5.3", "Package": { "providesPackages": {} } diff --git a/ext_emconf.php b/ext_emconf.php index a7c34c1..f980c1e 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ 'state' => 'stable', 'clearCacheOnLoad' => true, 'author_company' => 'b13 GmbH, Stuttgart', - 'version' => '1.5.2', + 'version' => '1.5.3', 'constraints' => [ 'depends' => [ 'typo3' => '10.4.0-14.99.99',