omg i forgot this #6
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 | |
pharynx-build: | |
name: Build plugin with Pharynx | |
needs: build-php | |
runs-on: ${{ matrix.image }} | |
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: Build Phar | |
uses: SOF3/pharynx@v0.2 | |
id: pharynx | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: RemoteResourcePack.phar | |
path: ${{ steps.pharynx.outputs.output-phar }} |