mirror of
https://github.com/pmmp/PHP-Binaries.git
synced 2025-03-01 02:21:12 +00:00
68 lines
2.7 KiB
YAML
68 lines
2.7 KiB
YAML
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/release-action@v1.15.0
|
|
with:
|
|
artifacts: |
|
|
${{ github.workspace }}/*PHP-*-PM*/*.tar.gz
|
|
${{ github.workspace }}/*PHP-*-Windows-PM*/*.zip
|
|
${{ github.workspace }}/*PHP-*.gdbinit/*.gdbinit
|
|
|
|
name: PHP (Build ${{ github.run_number }}) - Archive
|
|
tag: php-build-${{ github.run_number }}
|
|
commit: ${{ github.sha }}
|
|
allowUpdates: false
|
|
bodyFile: ${{ github.workspace }}/changelog.md
|