v0.2.3 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release to TER | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to build (without v prefix)' | |
| required: false | |
| default: '0.0.0-dev' | |
| jobs: | |
| release: | |
| name: Build and publish to TER | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: zip | |
| coverage: none | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "release" ]; then | |
| TAG="${{ github.event.release.tag_name }}" | |
| echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Set version in ext_emconf.php | |
| run: vendor/bin/tailor set-version "${{ steps.version.outputs.version }}" --no-docs | |
| - name: Build TER zip | |
| run: composer build:ter | |
| - name: Upload zip as build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mail_sender_${{ steps.version.outputs.version }} | |
| path: dist/*.zip | |
| - name: Attach zip to GitHub release | |
| if: github.event_name == 'release' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release upload "${{ github.event.release.tag_name }}" dist/*.zip --clobber | |
| - name: Publish to TER | |
| if: github.event_name == 'release' | |
| env: | |
| TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }} | |
| RELEASE_COMMENT: ${{ github.event.release.body }} | |
| run: | | |
| vendor/bin/tailor ter:publish \ | |
| --path .build/mail_sender \ | |
| --comment "$RELEASE_COMMENT" \ | |
| "${{ steps.version.outputs.version }}" \ | |
| mail_sender |