-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # plugin.yml
- Loading branch information
Showing
11 changed files
with
2,031 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev/* | ||
pull_request: | ||
|
||
jobs: | ||
build-php: | ||
name: Prepare PHP | ||
runs-on: ${{ matrix.image }} | ||
|
||
strategy: | ||
matrix: | ||
image: | ||
- ubuntu-20.04 | ||
php: | ||
- 8.2.1 | ||
|
||
steps: | ||
- name: Build and prepare PHP cache | ||
uses: pmmp/setup-php-action@4d1b890176aa299211f4ccae76ddbf9bd008bbd6 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
install-path: "./bin" | ||
pm-version-major: "4" | ||
|
||
|
||
phpstan: | ||
name: PHPStan analysis | ||
needs: build-php | ||
runs-on: ${{ matrix.image }} | ||
|
||
strategy: | ||
matrix: | ||
image: | ||
- ubuntu-20.04 | ||
php: | ||
- 8.2.1 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: pmmp/setup-php-action@4d1b890176aa299211f4ccae76ddbf9bd008bbd6 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
install-path: "./bin" | ||
pm-version-major: "4" | ||
|
||
- 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: composer install --prefer-dist --no-interaction | ||
|
||
- name: Analyze with PHPStan | ||
run: ./vendor/bin/phpstan analyze --no-progress --memory-limit=2G |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-php: | ||
name: Prepare PHP | ||
runs-on: ${{ matrix.image }} | ||
|
||
strategy: | ||
matrix: | ||
image: | ||
- ubuntu-20.04 | ||
php: | ||
- 8.2.1 | ||
|
||
steps: | ||
- name: Setup PHP | ||
uses: pmmp/setup-php-action@4d1b890176aa299211f4ccae76ddbf9bd008bbd6 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
install-path: "./bin" | ||
pm-version-major: "4" | ||
|
||
build-and-release-plugin: | ||
name: Release artifact | ||
needs: build-php | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
image: | ||
- ubuntu-20.04 | ||
php: | ||
- 8.2.1 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Pull pmmp/DevTools | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: pmmp/DevTools | ||
ref: master | ||
path: DevTools | ||
|
||
- name: Check Texter version | ||
id: check-texter-version | ||
run: | | ||
TEXTER_VERSION=`grep version plugin.yml | sed -e 's/^version: //g'` | ||
echo "::set-output name=VER::${TEXTER_VERSION}" | ||
- name: Check short SHA | ||
id: check-short-sha | ||
run: | | ||
HASH=${{ github.sha }} | ||
echo "::set-output name=SHA::${HASH::7}" | ||
- name: Setup PHP | ||
uses: pmmp/setup-php-action@4d1b890176aa299211f4ccae76ddbf9bd008bbd6 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
install-path: "./bin" | ||
pm-version-major: "4" | ||
|
||
- 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 (no dev) | ||
run: composer install --prefer-dist --no-interaction --no-dev | ||
|
||
- name: Optimize Composer autoloader | ||
run: composer dump-autoload --optimize | ||
|
||
- name: Build plugin Phar | ||
run: | | ||
rm -rf bin | ||
mkdir build | ||
php -dphar.readonly=0 DevTools/stub.php --make . --out "build/Texter_v${{ steps.check-texter-version.outputs.VER }}.phar" | ||
- name: Tagging commit | ||
id: tagging-commit | ||
env: | ||
TAG_NAME: v${{ steps.check-texter-version.outputs.VER }}(${{ steps.check-short-sha.outputs.SHA }}) | ||
run: | | ||
git tag ${TAG_NAME} | ||
git push origin ${TAG_NAME} | ||
echo "::set-output name=TAG::refs/tags/${TAG_NAME}" | ||
- name: Upload release artifact on Github | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file_glob: true | ||
file: build/** | ||
tag: ${{ steps.tagging-commit.outputs.TAG }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Composer | ||
/vendor/ | ||
|
||
# Intellij IDEA | ||
/.idea | ||
|
||
|
@@ -10,4 +13,4 @@ | |
/crfts.json | ||
/fts.json | ||
/uft.json | ||
/ft.json | ||
/ft.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "fuyutsuki/texter", | ||
"description": "Texter is a plugin for PocketMine-MP that supports multiple worlds and allows you to add, edit, move, and delete FloatingText.", | ||
"type": "project", | ||
"license": "NCSA", | ||
"authors": [ | ||
{ | ||
"name": "yuko fuyutsuki", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": { | ||
"name": "aieuo/mineflow", | ||
"version": "2.12.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/aieuo/Mineflow", | ||
"reference": "8c69fb5bbcec5def813148be9e8f01184c1c2d8b" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"aieuo\\mineflow\\": ["src/aieuo/mineflow"] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "package", | ||
"package": { | ||
"name": "dktapps-pm-pl/pmforms", | ||
"version": "2.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/dktapps-pm-pl/pmforms", | ||
"reference": "93cbd7b97a80d6edc54d9c8c8f58cea09ec3b47f" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"dktapps\\pmforms\\": ["src/dktapps/pmforms"] | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"require": { | ||
"dktapps-pm-pl/pmforms": "^2.0.0" | ||
}, | ||
"require-dev": { | ||
"aieuo/mineflow": "^2.12.0", | ||
"phpstan/phpstan": "^1.9", | ||
"pocketmine/pocketmine-mp": "^4.14" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"jp\\mcbe\\fuyutsuki\\Texter\\": ["src"] | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
} | ||
} |
Oops, something went wrong.