1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +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:
- vendor/bin/phpcs
# always build phar, but only deploy on tag builds
- stage: Phar build
php: 7.3
env: DEPS="high"
script: bin/build-phar.sh
deploy:
# deploy tagged releases to github releases page
- provider: releases
skip_cleanup: true
on:
tags: true
condition: ' "$GITHUB_TOKEN" != "" '
repo: vimeo/psalm
api_key: $GITHUB_TOKEN
file:
- build/psalm.phar
- 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
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

View File

@ -1,9 +1,11 @@
#!/usr/bin/env bash
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
git config user.email "travis@travis-ci.org"
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 push --quiet origin master