Skip to content

Commit 174e9fa

Browse files
committed
Change ter release process
1 parent 880cf09 commit 174e9fa

2 files changed

Lines changed: 12 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -95,52 +95,21 @@ jobs:
9595
- name: Reset composer.json
9696
run: git checkout composer.json;
9797

98-
publish:
98+
TERUpload:
9999
needs: [ xliff, lint, phpunit ]
100100
if: startsWith(github.ref, 'refs/tags/')
101101

102-
runs-on: ubuntu-20.04
102+
runs-on: ubuntu-latest
103103

104104
strategy:
105-
matrix:
106-
php-versions: ['7.4']
107-
108-
env:
109-
EXTENSION: ew_llxml2xliff
110-
USERNAME: ${{ secrets.typo3Username }}
111-
PASSWORD: ${{ secrets.typo3Password }}
105+
fail-fast: false
112106

113107
name: TYPO3 TER release
114108
steps:
115109
- name: Checkout
116110
uses: actions/checkout@v2
117111

118-
- name: Setup PHP
119-
uses: shivammathur/setup-php@v2
112+
- name: Publish to TER
113+
uses: tomasnorre/typo3-upload-ter@v1
120114
with:
121-
php-version: ${{ matrix.php-versions }}
122-
123-
- name: publish in ter
124-
run: |
125-
TAG="$(echo ${GITHUB_REF} | cut -d / -f 3)"
126-
if [[ "${TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [ -n "${USERNAME}" ] && [ -n "${PASSWORD}" ]; then
127-
echo -e "Preparing upload of release ${TAG} to TER\n";
128-
129-
# Install requirements
130-
composer global require helhum/ter-client
131-
132-
# Cleanup before we upload
133-
git reset --hard HEAD && git clean -fx
134-
135-
# Remove folder that shouldn't to get uploaded
136-
rm -rf .Build
137-
rm -rf .github
138-
139-
# Set version number from TAG
140-
sed -i "s/version' => '.*'/version' => '${TAG}'/" ext_emconf.php
141-
142-
# Upload
143-
TAG_MESSAGE=`git tag -n10 -l ${TAG} | sed 's/^[0-9.]*[ ]*//g'`
144-
echo "Uploading release ${TAG} to TER"
145-
$HOME/.composer/vendor/bin/ter-client upload ${EXTENSION} . -u "${USERNAME}" -p "${PASSWORD}" -m "${TAG_MESSAGE}"
146-
fi;
115+
api-token: ${{ secrets.TYPO3_API_TOKEN }}

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
},
4848

4949
"scripts": {
50-
"post-autoload-dump": "mkdir -p .Build/Web/typo3conf/ext/ && ln -snf ../../../.. .Build/Web/typo3conf/ext/ew_llxml2xliff"
50+
"post-autoload-dump": "mkdir -p .Build/Web/typo3conf/ext/ && ln -snf ../../../.. .Build/Web/typo3conf/ext/ew_llxml2xliff",
51+
"prepare-release": [
52+
"rm -rf .Build",
53+
"rm -rf .github",
54+
"sed -i \"s/version' => '.*'/version' => '$(echo ${GITHUB_REF} | cut -d / -f 3)'/\" ext_emconf.php\n"
55+
]
5156
}
5257
}

0 commit comments

Comments
 (0)