File tree Expand file tree Collapse file tree 3 files changed +50
-37
lines changed
Expand file tree Collapse file tree 3 files changed +50
-37
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Create Release Build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ env :
9+ OUTPUT_FILE : ${{ github.event.repository.name }}_v${{ github.ref_name }}.phar
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Change plugin structure from PSR-4 to PSR-0
19+ shell : php {0}
20+ run : |
21+ <?php
22+ $description = yaml_parse_file("plugin.yml");
23+ $path = str_replace("\\", "/", $description["src-namespace-prefix"] ?? exit);
24+ system("mkdir -p _/$path; mv src/* _/$path; rmdir src; mv _ src");
25+ unset($description["src-namespace-prefix"]);
26+ yaml_emit_file("plugin.yml", $description);
27+
28+ - name : Build plugin
29+ run : curl -sL https://raw.githubusercontent.com/pmmp/DevTools/1.17.1/src/ConsoleScript.php | php -dphar.readonly=0 -- --make ./ --out $OUTPUT_FILE
30+
31+ - name : Infect virions
32+ shell : php {0}
33+ run : |
34+ <?php
35+ foreach(@yaml_parse_file(".poggit.yml")["projects"] ?? [] as $project){
36+ foreach($project["libs"] ?? [] as $lib){
37+ $url = "https://poggit.pmmp.io/v.dl/{$lib["src"]}/" . ($lib["version"] ?? "*");
38+ @$lib["branch"] && $url .= "?branch={$lib["branch"]}";
39+ file_put_contents("virion.phar", file_get_contents($url));
40+ system("php -dphar.readonly=0 virion.phar ${{ env.OUTPUT_FILE }}");
41+ }
42+ }
43+
44+ - uses : softprops/action-gh-release@v0.1.15
45+ with :
46+ name : ${{ github.event.repository.name }} ${{ github.ref_name }}
47+ generate_release_notes : true
48+ files : ${{ env.OUTPUT_FILE }}
Original file line number Diff line number Diff line change 33# IDEs
44.idea /
55nbproject /
6- .vscode /**
7- ! .vscode / settings.json
6+ .vscode /
7+ .editorconfig
88
99# Windows
1010Thumbs.db
You can’t perform that action at this time.
0 commit comments