add "deploy to packagist" stage during ci

This commit is contained in:
Julien Fastré 2016-11-17 22:29:40 +01:00
parent 961d942f38
commit 5ac623075d

View File

@ -1,6 +1,6 @@
.test_definition: &test_definition
services:
- chill/database:latest
before_script:
- composer config github-oauth.github.com $GITHUB_TOKEN
- composer install --no-interaction
@ -11,8 +11,18 @@ before_script:
test:php-5.6:
stage: test
image: chill/ci-image:php-5.6
<<: *test_definition
script: phpunit
test:php-7:
image: chill/ci-image:php-7
stage: test
<<: *test_definition
script: phpunit
deploy-packagist:
stage: deploy
image: chill/ci-image:php-7
before_script: ~
script:
- curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_TOKEN" -d"{\"repository\":{\"url\":\"$CI_PROJECT_PATH.git\"}}"