diff --git a/.travis.yml b/.travis.yml index 591f63b4f841..d3ce21eabfe5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,17 +21,33 @@ jobs: include: - stage: compile - php: 7.2 name: "Compile Rector to prefixed PHAR" - before_install: + php: 7.2 + script: - cd compiler - install: - composer install - script: - bin/compile # run prefixed Rector - ../tmp/rector.phar + # inspired by https://github.com/phpstan/phpstan-src/blob/088b9fab470632cea07f08a936fb0923a59b2ecb/.travis.yml#L47-L59 + - + stage: phar + name: "Deploy PHAR to https://github.com/rectorphp/rector-prefixed" + php: 7.2 + script: + - composer install --working-dir=compiler + - php compiler/bin/compile + - git clone https://${GITHUB_TOKEN}@github.com/rectorphp/rector-prefixed.git rector-prefixed > /dev/null 2>&1 + - cp tmp/rector.phar rector-prefixed/rector.phar + - cp tmp/rector.phar rector-prefixed/rector + - cd rector-prefixed + - git config user.email "travis@travis-ci.org" + - git config user.name "Travis CI" + - git add rector rector.phar + - git commit -m "Updated Rector to commit ${TRAVIS_COMMIT}" + - git push --quiet origin master + # Stage 1 - stage: test