2021-01-11 19:16:44 +01:00
|
|
|
name: Build phar
|
|
|
|
|
2021-01-11 19:27:58 +01:00
|
|
|
on:
|
2021-01-11 19:16:44 +01:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-phar:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: '7.4'
|
|
|
|
tools: composer:v2
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get Composer Cache Directories
|
|
|
|
id: composer-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=files_cache::$(composer config cache-files-dir)"
|
|
|
|
echo "::set-output name=vcs_cache::$(composer config cache-vcs-dir)"
|
|
|
|
|
|
|
|
- name: Cache composer cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{ steps.composer-cache.outputs.files_cache }}
|
|
|
|
${{ steps.composer-cache.outputs.vcs_cache }}
|
|
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-composer-
|
|
|
|
|
|
|
|
- name: Run composer install
|
|
|
|
run: composer install -o
|
|
|
|
env:
|
|
|
|
COMPOSER_ROOT_VERSION: dev-master
|
|
|
|
|
|
|
|
- run: bin/build-phar.sh
|
|
|
|
env:
|
2021-01-11 20:37:17 +01:00
|
|
|
GPG_SIGNING: 1
|
2021-01-11 21:15:14 +01:00
|
|
|
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
|
|
|
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
2021-01-11 19:16:44 +01:00
|
|
|
|
|
|
|
- name: Upload release assets
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: build/psalm.phar*
|
|
|
|
file_glob: true
|
|
|
|
tag: ${{ github.ref }}
|