mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 09:58:59 +01:00
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
name: build
|
|
on:
|
|
release:
|
|
types: [prereleased]
|
|
|
|
jobs:
|
|
run:
|
|
runs-on: Linux
|
|
strategy:
|
|
matrix:
|
|
php:
|
|
- '8.1'
|
|
- '8.0'
|
|
- '7.4'
|
|
- '7.3'
|
|
- '7.2'
|
|
- '7.1'
|
|
name: PHP ${{ matrix.php }} build
|
|
env:
|
|
PHP_CS_FIXER_IGNORE_ENV: 1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ssh-key: ${{ secrets.DEPLOY_KEY }}
|
|
submodules: false
|
|
|
|
- name: Set env
|
|
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- name: Build
|
|
env:
|
|
API_ID: ${{ secrets.API_ID }}
|
|
API_HASH: ${{ secrets.API_HASH }}
|
|
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
DEST: ${{ secrets.DEST }}
|
|
DESTINATIONS: ${{ secrets.DESTINATIONS }}
|
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
|
PHP_VERSION: ${{ matrix.php }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tests/makephar.sh
|
|
deploy:
|
|
runs-on: Linux
|
|
name: Deploy
|
|
needs: [run]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ssh-key: ${{ secrets.DEPLOY_KEY }}
|
|
submodules: false
|
|
|
|
- name: Set env
|
|
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- name: Deploy
|
|
env:
|
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
tests/deploy.sh
|