Skip to content

Commit

Permalink
[Build] support NG fork
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Jan 23, 2025
1 parent 0b9bb2e commit 5fd3263
Show file tree
Hide file tree
Showing 9 changed files with 631 additions and 589 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
19 changes: 19 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto Merge Dependabot

on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
automerge:
runs-on: ubuntu-latest
permissions: write-all
steps:
- id: automerge
name: automerge
uses: pascalgn/automerge-action@v0.15.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_DELETE_BRANCH: true
MERGE_FILTER_AUTHOR: dependabot[bot]
MERGE_LABELS: ''
MERGE_METHOD: squash
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

on: push

jobs:
build:
name: Phar building
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, '[Build]')"

steps:
- name: Startup
uses: actions/checkout@v3
- name: Setup PHP and tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: phpstan
coverage: none
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-dev
- name: Download pharbuilder-rs
uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
file: pharbuilder
repo: NetherGamesMC/pharbuilder-rs
token: ${{ secrets.ng_token }}
- name: Build
run: |
echo Building...
chmod +x pharbuilder
./pharbuilder -i . -o ./BlockLagFix.phar
echo Build completed!
- name: Upload
uses: actions/upload-artifact@v4
with:
name: BlockLagFix
path: BlockLagFix.phar
40 changes: 0 additions & 40 deletions .github/workflows/main.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PHPStan CI

on: push

jobs:
phpstan:
name: PHPStan Analysis
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- name: Startup
uses: actions/checkout@v3
- name: Setup PHP and tools
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --ignore-platform-reqs
- name: Run PHPStan
run: ./vendor/bin/phpstan analyze --no-progress
29 changes: 9 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,25 @@
"minimum-stability": "dev",
"license": "MIT",
"require": {
"pocketmine/pocketmine-mp": "^5.0.0",
"muqsit/simplepackethandler": "0.1.4"
"muqsit/simple-packet-handler": "^0.1.4"
},
"require-dev": {
"phpstan/phpstan": "^1.2.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/extension-installer": "^1.0"
"phpstan/extension-installer": "^1.0",
"nethergamesmc/pocketmine-mp": "dev-stable"
},
"repositories": [
{
"type": "package",
"package": {
"name": "muqsit/simplepackethandler",
"version": "0.1.4",
"autoload": {
"classmap": ["src/"]
},
"source": {
"url": "https://github.com/javierleon9966/simplepackethandler",
"type": "git",
"reference": "patch-1"
}
}
}
],
"autoload": {
"psr-0": {
"JavierLeon9966\\BlockLagFix\\": "src"
}
},
"replace": {
"pocketmine/pocketmine-mp": "*"
},
"repositories": [
{ "type": "vcs", "url": "git@github.com:NetherGamesMC/PocketMine-MP.git" }
],
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
Expand Down
Loading

0 comments on commit 5fd3263

Please sign in to comment.