-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
24 lines (22 loc) · 1.11 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
image: php:8.0-cli
before_script:
- apt-get update
- apt-get install -y git libxml2-dev zlib1g-dev jq libzip-dev
- docker-php-ext-install zip > /dev/null
- curl -s https://raw.githubusercontent.com/composer/getcomposer.org/master/web/installer | php -- --quiet --install-dir="/usr/local/bin" --filename="composer"
deploy-ter:
tags:
- docker
only:
- tags
script:
- |
if [ -n "$TYPO3_API_USERNAME" ] && [ -n "$TYPO3_API_PASSWORD" ]; then
echo "Releasing ${CI_COMMIT_TAG} to ter.typo3.org"
composer global require typo3/tailor
# Create a new api token that exipres after 10 minutes (minimum time is 60 seconds)
TYPO3_API_TOKEN=$($HOME/.composer/vendor/bin/tailor ter:token:create --name="token for nws_municipal_statutes $CI_COMMIT_TAG publishing" --extensions=nws_municipal_statutes --raw --expires=600 | jq -r ".access_token")
# cleanup before upload
rm -rf build vendor .git* composer.lock gulpfile.js package.json Resources/Private/Sources .jshintrc
$HOME/.composer/vendor/bin/tailor ter:publish "$CI_COMMIT_TAG" nws_municipal_statutes
fi;