... #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-php: | |
name: Prepare PHP | |
runs-on: ${{ matrix.image }} | |
strategy: | |
matrix: | |
image: [ ubuntu-20.04 ] | |
php: [ 8.2 ] | |
steps: | |
- name: Build and prepare PHP cache | |
uses: pmmp/setup-php-action@d2510ba2c63846f7aac4ed6e8b6b2346400c9ef0 | |
with: | |
php-version: ${{ matrix.php }} | |
install-path: "./bin" | |
pm-version-major: 5 | |
build: | |
name: Build plugin with Pharynx | |
runs-on: ${{ matrix.image }} | |
needs: build-php | |
strategy: | |
matrix: | |
image: [ ubuntu-20.04 ] | |
php: [ 8.2 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: pmmp/setup-php-action@d2510ba2c63846f7aac4ed6e8b6b2346400c9ef0 | |
with: | |
php-version: ${{ matrix.php }} | |
install-path: "./bin" | |
pm-version-major: 5 | |
- name: Install Composer | |
run: curl -sS https://getcomposer.org/installer | php | |
- name: Restore Composer package cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/composer/files | |
~/.cache/composer/vcs | |
key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}" | |
restore-keys: | | |
composer-v2-cache- | |
- name: Install Composer dependencies | |
run: php composer.phar install --prefer-dist --no-interaction | |
- name: Download latest DevTools | |
run: wget https://poggit.pmmp.io/r/220133/PocketMine-DevTools.phar -O DevTools.phar | |
- name: Build plugin | |
run: php -dphar.readonly=0 DevTools.phar --make . --out RemoteResourcePack.phar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RemoteResourcePack.phar | |
path: RemoteResourcePack.phar |