Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@ name: build

on:
push:
tags: '*'
tags:
- '*'

env:
OUTPUT_FILE: ${{ github.event.repository.name }}_v${{ github.ref_name }}.phar

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Build plugin
run: |
curl -sLo .php https://raw.githubusercontent.com/pmmp/DevTools/master/src/ConsoleScript.php
php -dphar.readonly=0 .php --make ./ --out ${{ github.event.repository.name }}.phar
run: curl -sL https://raw.githubusercontent.com/pmmp/DevTools/1.16.0/src/ConsoleScript.php | php -dphar.readonly=0 -- --make ./ --out $OUTPUT_FILE

- name: Infect virions
run: php -dphar.readonly=0 -r '
file_put_contents("virion.php", file_get_contents("https://gist.githubusercontent.com/Nerahikada/a1fbb18c6fe4b2e10bb7baa7de9d0710/raw/virion.php"));
$data = yaml_parse_file(".poggit.yml") ?:["projects" => [[]]];
foreach(reset($data["projects"])["libs"] ?? [] as $lib){
file_put_contents("virion.phar", file_get_contents("https://poggit.pmmp.io/v.dl/{$lib["src"]}/" . ($lib["version"] ?? "*")));
(new Phar("virion.phar"))->addFile("virion.php", "virion.php");
system("php -dphar.readonly=0 virion.phar ${{ env.OUTPUT_FILE }}");
}'

- uses: softprops/[email protected]
with:
files: ${{ github.event.repository.name }}.phar
name: ${{ github.event.repository.name }} ${{ github.ref_name }}
generate_release_notes: true
files: ${{ env.OUTPUT_FILE }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
*.phar
resources/recipes

# IDEs
.idea/
nbproject/
.vscode/**
!.vscode/settings.json

# Windows
Thumbs.db
Expand Down
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"editor.detectIndentation": false, // インデント構成の検知を無効化
"editor.insertSpaces": false, // タブを使用する
"intelephense.environment.phpVersion": "8.0.21", // PMMPのバージョンに合わせる
"editor.tabCompletion": "on",
"emmet.excludeLanguages": [ // HTMLやcssが書きやすくなる拡張機能らしいですが、pmmpの場合はほぼ使わないので無効化(勝手に展開されて邪魔)
"markdown",
"php"
],
"files.insertFinalNewline": true, // .editerconfig の仕様に合わせる
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2
},
"[json]": {
"editor.insertSpaces": true,
"editor.tabSize": 4
},
"[php]": {
"editor.tabSize": 4
}
}
Loading