mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-08 20:22:24 +00:00
[CI] do not build rector.phar, only scoped
This commit is contained in:
parent
9d7fa63bf8
commit
e7f1963d67
60
.github/inactive_workflows/rector_phar.yml
vendored
60
.github/inactive_workflows/rector_phar.yml
vendored
|
@ -1,60 +0,0 @@
|
|||
name: Rector_PHAR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
compile_and_deploy_rector_phar:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
php-version: 7.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
|
||||
- run: |
|
||||
cd compiler
|
||||
composer install --ansi
|
||||
|
||||
- run: |
|
||||
cd compiler
|
||||
bin/compile --ansi
|
||||
|
||||
- run: |
|
||||
# remove local vendor, to prevent duplicated content
|
||||
rm -rf vendor
|
||||
# remove local phpstan.neon, that loads just removed configs
|
||||
rm phpstan.neon
|
||||
tmp/rector.phar
|
||||
|
||||
-
|
||||
name: ''
|
||||
if: github.event_name == 'push' || github.event_name == 'release'
|
||||
run: |
|
||||
[[ $GITHUB_REF == refs/tags/* ]] && CURRENT_TAG=${GITHUB_REF#refs/tags/} || CURRENT_TAG=""
|
||||
|
||||
git clone https://${ACCESS_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.name "TomasVotruba"
|
||||
git config user.email "tomas.vot@gmail.com"
|
||||
git add rector rector.phar
|
||||
|
||||
if [ "${CURRENT_TAG}" != "" ]; then COMMIT_MSG="Rector ${CURRENT_TAG}"; else COMMIT_MSG="Updated Rector to commit ${GITHUB_SHA}"; fi
|
||||
|
||||
git commit -m "${COMMIT_MSG}"
|
||||
git push --quiet origin master
|
||||
|
||||
if [ "${CURRENT_TAG}" != "" ]; then git tag "${CURRENT_TAG}" && git push --quiet origin ${CURRENT_TAG}; fi
|
||||
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
53
.travis.yml
53
.travis.yml
|
@ -1,53 +0,0 @@
|
|||
os: linux
|
||||
|
||||
dist: bionic
|
||||
|
||||
language: php
|
||||
|
||||
php: 7.4
|
||||
|
||||
if: (branch = master OR tag IS present) && type = push
|
||||
|
||||
before_install:
|
||||
# turn off XDebug
|
||||
- phpenv config-rm xdebug.ini
|
||||
|
||||
# autoload has changed on Composer 2 and is broken
|
||||
- composer self-update --1
|
||||
jobs:
|
||||
include:
|
||||
# inspired by https://github.com/phpstan/phpstan-src/blob/088b9fab470632cea07f08a936fb0923a59b2ecb/.travis.yml#L47-L59
|
||||
# "Deploy to https://github.com/rectorphp/rector-prefixed"
|
||||
-
|
||||
name: Compile and Release rector.phar
|
||||
script:
|
||||
- cd compiler
|
||||
|
||||
# see https://gist.github.com/jeffersonmartin/d0d4a8dfec90d224d14f250b36c74d2f
|
||||
# see https://www.previousnext.com.au/blog/managing-composer-github-access-personal-access-tokens
|
||||
- composer config -g github-oauth.github.com $GITHUB_TOKEN
|
||||
|
||||
- composer install --ansi
|
||||
- bin/compile --ansi
|
||||
- ../tmp/rector.phar --ansi
|
||||
|
||||
- cd ..
|
||||
|
||||
# reuse tmp/rector.phar from previous job
|
||||
- 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.name "TomasVotruba"
|
||||
- git config user.email "tomas.vot@gmail.com"
|
||||
- git add rector rector.phar
|
||||
|
||||
- if [ "${TRAVIS_TAG}" != "" ]; then COMMIT_MSG="Rector ${TRAVIS_TAG}"; else COMMIT_MSG="Updated Rector to commit ${TRAVIS_COMMIT}"; fi
|
||||
|
||||
- git commit -m "${COMMIT_MSG}"
|
||||
- git push --quiet origin master -f
|
||||
|
||||
- if [ "${TRAVIS_TAG}" != "" ]; then git tag "${TRAVIS_TAG}" && git push --quiet origin ${TRAVIS_TAG}; fi
|
||||
|
||||
notifications:
|
||||
email: false
|
Loading…
Reference in New Issue
Block a user