Skip to content

Commit

Permalink
Merge branch 'dev/4.1'
Browse files Browse the repository at this point in the history
# Conflicts:
#	plugin.yml
  • Loading branch information
fuyutsuki committed Feb 16, 2023
2 parents 4eaf00a + 6e1a072 commit 60a8d5b
Show file tree
Hide file tree
Showing 11 changed files with 2,031 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/changelogs/4.x/en_us.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 4.1.x

### 4.1.9

#### :arrow_heading_up: follow PMMP changes

- Added support for PMMP 4.14.x (Minecraft 1.19.60~) (#137)

### 4.1.8

#### :arrow_heading_up: follow PMMP changes
Expand Down
6 changes: 6 additions & 0 deletions .github/changelogs/4.x/ja_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 4.1.x

### 4.1.9

#### :arrow_heading_up: PMMPの変更に追従

- PMMP 4.14.x (Minecraft 1.19.60~) に対応しました

### 4.1.8

#### :arrow_heading_up: PMMPの変更に追従
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
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
109 changes: 109 additions & 0 deletions .github/workflows/release.yml
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 }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Composer
/vendor/

# Intellij IDEA
/.idea

Expand All @@ -10,4 +13,4 @@
/crfts.json
/fts.json
/uft.json
/ft.json
/ft.json
64 changes: 64 additions & 0 deletions composer.json
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
}
}
Loading

0 comments on commit 60a8d5b

Please sign in to comment.