-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (81 loc) · 3.23 KB
/
build.yml
File metadata and controls
95 lines (81 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: Create Build
if: "startsWith(github.event.head_commit.message, '[Release] ')"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: robinraju/release-downloader@v1.8
with:
repository: "pmmp/PHP-Binaries"
tag: "php-8.0-latest"
fileName: "PHP-Linux-x86_64-PM4.tar.gz"
- name: Prepare PHP
run: |
tar -xvzf PHP-Linux-x86_64-PM4.tar.gz -C ./.github/
rm -r PHP-Linux-x86_64-PM4.tar.gz
- uses: robinraju/release-downloader@v1.8
with:
repository: "iAldrich23xX/Phar-Builder"
tag: "1.0"
token: ${{ secrets.INTERNAL_TOKEN }}
fileName: "PharBuilder.zip"
- name: Prepare PharBuilder
run: |
mkdir .phar-builder
unzip PharBuilder.zip -d ./.phar-builder/
- name: Get Virion version
id: yaml-data
uses: jbutcher5/read-yaml@main
with:
file: './libasynDiscordWebHook-PM/virion.yml'
key-path: '["version"]'
- name: Compile virion
run: |
echo "Building"
cd libasynDiscordWebHook-PM
./../.github/bin/php7/bin/php -dphar.readonly=0 ./../.phar-builder/PharBuilder/virion/VirionBuildScript.php --make . --out libasynWebHook-PM-virion-${{ steps.yaml-data.outputs.data }}.phar
echo "Build completed!"
- name: Compile example-plugins
run: |
echo "Building"
cd libasynDiscordWebHook-PM/example-plugin
wget https://getcomposer.org/download/latest-stable/composer.phar
echo "Composer installing..."
./../../.github/bin/php7/bin/php composer.phar install --prefer-dist --no-interaction --no-dev
rm -r composer.phar
./../../.github/bin/php7/bin/php -dphar.readonly=0 ./../../.phar-builder/PharBuilder/plugin/PluginBuildScript.php --make . --out pmmp4-example-${{ steps.yaml-data.outputs.data }}.phar
echo "Build completed!"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'corretto'
cache: maven
- name: Build
run: mvn clean package
- name: Get Maven version
run: |
VERSION=$(mvn -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Upload Artifact
uses: ncipollo/release-action@v1.13.0
with:
artifacts: ${{ github.workspace }}/libasynDiscordWebHook-API/target/libasynDiscordWebHook-API-${{ env.VERSION }}.jar, ${{ github.workspace }}/libasynDiscordWebHook-PM/example-plugin/*.phar, ${{ github.workspace }}/libasynDiscordWebHook-PM/*.phar
draft: false
name: Release v${{ env.VERSION }}
tag: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
body: "v1.1.0 define is channel of discord is forum & set title of 'post' forum"
commit: ${{ github.sha }}
allowUpdates: true
removeArtifacts: false
replacesArtifacts: false