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

Rearrange build/sign/deploy

- Phar signing moved to build-phar.sh (conditional on gpg keys
availability)
- Tagged phar releases moved to travis-deploy-phar.sh
- `travis-deploy-phar.sh` is now triggered via `script` deploy provider
This commit is contained in:
Bruce Weirdan 2019-06-01 17:25:26 +03:00 committed by Matthew Brown
parent b494629d55
commit 96521a6469
3 changed files with 24 additions and 17 deletions

View File

@ -66,20 +66,18 @@ jobs:
- stage: Phar build - stage: Phar build
php: 7.3 php: 7.3
env: DEPS="high" env: DEPS="high"
script: script: bin/build-phar.sh
- bin/build-phar.sh
- if [[ "$TRAVIS_PULL_REQUEST" = 'false' && "$GITHUB_TOKEN" != '']]; then bin/travis-deploy-phar.sh; fi
before_deploy:
- echo $GPG_ENCRYPTION | gpg --passphrase-fd 0 keys.asc.gpg
- gpg --batch --yes --import keys.asc
- echo $SIGNING_KEY | gpg --passphrase-fd 0 -u 8A03EA3B385DBAA1 --armor --detach-sig build/psalm.phar
- cd phar && git tag ${TRAVIS_TAG} && git push origin ${TRAVIS_TAG} && cd ..
deploy: deploy:
skip_cleanup: true - provider: releases
on: skip_cleanup: true
tags: true on:
provider: releases tags: true
api_key: $GITHUB_TOKEN condition: ' "$GITHUB_TOKEN" != "" '
file: api_key: $GITHUB_TOKEN
- build/psalm.phar file:
- build/psalm.phar.asc - build/psalm.phar
- build/psalm.phar.asc
- provider: script
skip_cleanup: true
condition: ' "$TRAVIS_PULL_REQUEST" = "false" && "$GITHUB_TOKEN" != "" '
script: bin/travis-deploy-phar.sh

View File

@ -3,4 +3,8 @@ composer bin box install
vendor/bin/box compile vendor/bin/box compile
# build/psalm.phar --config=bin/phar.psalm.xml if [[ "$GPG_ENCRYPTION" != '' ]] ; then
echo $GPG_ENCRYPTION | gpg --passphrase-fd 0 keys.asc.gpg
gpg --batch --yes --import keys.asc
echo $SIGNING_KEY | gpg --passphrase-fd 0 -u 8A03EA3B385DBAA1 --armor --detach-sig build/psalm.phar
fi

View File

@ -6,3 +6,8 @@ git config user.name "Travis CI"
git add psalm.phar git add psalm.phar
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
if [[ "$TRAVIS_TAG" != '' ]] ; then
git tag "$TRAVIS_TAG"
git push origin "$TRAVIS_TAG"
fi