-
Notifications
You must be signed in to change notification settings - Fork 171
65 lines (57 loc) · 2.6 KB
/
main.yml
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
name: Build and publish PHP binaries
on:
push:
branches: "**"
tags-ignore: "**"
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
all-builds:
name: PM${{ matrix.pm-version-major }} - PHP ${{ matrix.php-version-base }}
strategy:
matrix:
include:
- pm-version-major: 5
php-version-base: "8.2"
special-release: default-latest #default = best for PM5, latest = display as latest on GitHub
- pm-version-major: 5
php-version-base: "8.3"
uses: ./.github/workflows/main-pm-matrix.yml
with:
pm-version-major: ${{ matrix.pm-version-major }}
php-version-base: ${{ matrix.php-version-base }}
special-release: ${{ matrix.special-release || 'none' }}
pm-preview: ${{ matrix.pm-preview || false }}
secrets: inherit
publish-archive-release:
name: Publish archive release
needs: [all-builds]
runs-on: ubuntu-20.04
if: ${{ github.ref_name == 'stable' && github.ref_type == 'branch' && !contains(github.event.head_commit.message, '[no release]') }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}
- name: Generate release notes
run: |
echo "Built by: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> changelog.md
echo "Build number: ${{ github.run_number }}" >> changelog.md
echo -e "\n\n\n" >> changelog.md
echo ":information_source: **Linux/MacOS users**: Please see [this page](https://doc.pmmp.io/en/rtfd/faq/installation/opcache.so.html) to fix extension loading errors. Also, check out the [PocketMine-MP Linux/MacOS installer](https://doc.pmmp.io/en/rtfd/installation/get-dot-pmmp-dot-io.html)." >> changelog.md
echo ":warning: **Windows users**: Don't forget to install [Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe) or the binary will not work!" >> changelog.md
echo -e "\n\n\n" >> changelog.md
- name: Create release
uses: ncipollo/[email protected]
with:
artifacts: |
${{ github.workspace }}/*PHP-*-PM*/*.tar.gz
${{ github.workspace }}/*PHP-*-Windows-PM*/*.zip
name: PHP (Build ${{ github.run_number }}) - Archive
tag: php-build-${{ github.run_number }}
commit: ${{ github.sha }}
allowUpdates: false
bodyFile: ${{ github.workspace }}/changelog.md