Do not import to TER #1
Workflow file for this run
This file contains 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: Deploy | |
on: | |
push: | |
tags: | |
- "v?[0-9]+.[0-9]+.[0-9]+" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
Ship-to-TER: | |
name: 'Ship to TER' | |
if: github.repository == 'TYPO3-Console/TYPO3-Console' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Composer Cache Vars | |
id: composer-cache-vars | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
echo "timestamp=$(date +"%s")" >> $GITHUB_OUTPUT | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache-vars.outputs.dir }} | |
key: ${{ runner.os }}-composer-^11.5.26-stable-8.1-${{ steps.composer-cache-vars.outputs.timestamp }} | |
restore-keys: | | |
${{ runner.os }}-composer-^11.5.26-stable-8.1- | |
${{ runner.os }}-composer-^11.5.26-stable- | |
${{ runner.os }}-composer-^11.5.26- | |
${{ runner.os }}-composer- | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
coverage: none | |
- name: "Extract tag, branch, version from GITHUB_REF" | |
id: "github-ref" | |
run: | | |
echo "tag=$(echo $GITHUB_REF | sed -E -n 's#^refs/tags/(.*)$#\1#p')" >> $GITHUB_OUTPUT | |
echo "branch=$(echo $GITHUB_REF | sed -E -n 's#^refs/heads/(.*)$#\1#p')" >> $GITHUB_OUTPUT | |
echo "version=$(echo $GITHUB_REF | sed -E -n 's#^refs/tags/v?([0-9]+\.)([0-9]+\.)([0-9]+)#\1\2\3#p')" >> $GITHUB_OUTPUT | |
- name: Deploy to TER | |
run: | | |
if [ -n "${{ secrets.TYPO3_ORG_USERNAME }}" ] && [ -n "${{ secrets.TYPO3_ORG_PASSWORD }}" ]; then | |
echo -e "Preparing upload of release ${{ steps.github-ref.outputs.version }} to TER\n"; | |
# Install ter client | |
composer global require typo3/tailor | |
export PATH=$PATH:$(composer global config bin-dir --absolute --quiet); | |
# Build extension files | |
composer extension-release | |
# Upload | |
export TAG_MESSAGE=$(git tag -n10 -l ${{ steps.github-ref.outputs.tag }} | sed 's/^[v]*[0-9.]*[ ]*//g') | |
echo $TAG_MESSAGE | |
echo "Uploading release ${{ steps.github-ref.outputs.version }} to TER" | |
TYPO3_API_USERNAME="${{ secrets.TYPO3_ORG_USERNAME }}" TYPO3_API_PASSWORD="${{ secrets.TYPO3_ORG_PASSWORD }}" tailor ter:publish --path ../extension --comment "$TAG_MESSAGE" "${{ steps.github-ref.outputs.version }}" typo3_console | |
fi; |