1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Simplify build config by using repo filter

Also deploy signature to psalm/phar repo (because why not)
This commit is contained in:
Bruce Weirdan 2019-06-01 19:51:33 +03:00 committed by Matthew Brown
parent 96521a6469
commit e6f4f27498
2 changed files with 12 additions and 5 deletions

View File

@ -62,22 +62,27 @@ jobs:
script: script:
- vendor/bin/phpcs - vendor/bin/phpcs
# always build phar, but only deploy on tag builds
- stage: Phar build - stage: Phar build
php: 7.3 php: 7.3
env: DEPS="high" env: DEPS="high"
script: bin/build-phar.sh script: bin/build-phar.sh
deploy: deploy:
# deploy tagged releases to github releases page
- provider: releases - provider: releases
skip_cleanup: true skip_cleanup: true
on: on:
tags: true tags: true
condition: ' "$GITHUB_TOKEN" != "" ' repo: vimeo/psalm
api_key: $GITHUB_TOKEN api_key: $GITHUB_TOKEN
file: file:
- build/psalm.phar - build/psalm.phar
- build/psalm.phar.asc - build/psalm.phar.asc
# deploy built phar to github.com/psalm/phar repo for all branches and tags,
# but not for pull requests
- provider: script - provider: script
skip_cleanup: true skip_cleanup: true
condition: ' "$TRAVIS_PULL_REQUEST" = "false" && "$GITHUB_TOKEN" != "" ' on:
repo: vimeo/psalm
condition: ' "$TRAVIS_PULL_REQUEST" = "false" '
script: bin/travis-deploy-phar.sh script: bin/travis-deploy-phar.sh

View File

@ -1,9 +1,11 @@
#!/usr/bin/env bash
git clone https://${GITHUB_TOKEN}@github.com/psalm/phar.git > /dev/null 2>&1 git clone https://${GITHUB_TOKEN}@github.com/psalm/phar.git > /dev/null 2>&1
cp build/psalm.phar phar/psalm.phar cp build/psalm.phar build/psalm.phar.asc phar/
cd phar cd phar
git config user.email "travis@travis-ci.org" git config user.email "travis@travis-ci.org"
git config user.name "Travis CI" git config user.name "Travis CI"
git add psalm.phar git add psalm.phar psalm.phar.asc
git commit -m "Updated Psalm phar to commit ${TRAVIS_COMMIT}" git commit -m "Updated Psalm phar to commit ${TRAVIS_COMMIT}"
git push --quiet origin master git push --quiet origin master