forked from pmmp/PHP-Binaries
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a39aae
commit f111e61
Showing
5 changed files
with
590 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
- name: Install tools and dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install make autoconf automake libtool libtool-bin m4 wget libc-bin gzip bzip2 bison g++ git re2c | ||
sudo apt-get install make autoconf automake libtool libtool-bin m4 curl libc-bin gzip bzip2 bison g++ git re2c ca-certificates | ||
- name: Prepare compile.sh download cache | ||
id: download-cache | ||
|
@@ -44,16 +44,19 @@ jobs: | |
- name: Create tarball | ||
run: | | ||
tar -czf ./PHP-Linux-x86_64-PM${{ matrix.pm-version-major }}.tar.gz bin | ||
tar -czf ./PHP-Linux-x86_64-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
tar -czf ./PHP-Linux-x86_64.tar.gz bin | ||
tar -czf ./PHP-Linux-x86_64-debugging-symbols.tar.gz bin-debug | ||
cp ./PHP-Linux-x86_64.tar.gz ./PHP_Linux-x86_64.tar.gz | ||
zip -r ./Linux.zip ./PHP_Linux-x86_64.tar.gz | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: Linux-PM${{ matrix.pm-version-major }} | ||
path: | | ||
./PHP-Linux-x86_64-PM${{ matrix.pm-version-major }}*.tar.gz | ||
./Linux.zip | ||
./PHP-Linux-x86_64*.tar.gz | ||
install.log | ||
compile.sh | ||
if-no-files-found: error | ||
|
@@ -80,10 +83,10 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install tools and dependencies | ||
run: brew install libtool autoconf automake pkg-config bison re2c | ||
|
||
- name: Prepare compile.sh download cache | ||
id: download-cache | ||
uses: actions/cache@v3 | ||
|
@@ -98,19 +101,19 @@ jobs: | |
set -ex | ||
trap "exit 1" ERR | ||
./compile.sh -t mac-x86-64 -j4 -g -P ${{ matrix.pm-version-major }} -c ./download_cache -D | ||
- name: Create tarball | ||
run: | | ||
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}.tar.gz bin | ||
tar -czf ./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}-debugging-symbols.tar.gz bin-debug | ||
tar -czf ./PHP-MacOS-x86_64.tar.gz bin | ||
tar -czf ./PHP-MacOS-x86_64-debugging-symbols.tar.gz bin-debug | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: MacOS-PM${{ matrix.pm-version-major }} | ||
path: | | ||
./PHP-MacOS-x86_64-PM${{ matrix.pm-version-major }}*.tar.gz | ||
./PHP-MacOS-x86_64*.tar.gz | ||
install.log | ||
compile.sh | ||
if-no-files-found: error | ||
|
@@ -137,10 +140,10 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install tools and dependencies | ||
run: choco install wget --no-progress | ||
|
||
- name: Compile PHP | ||
run: .\windows-compile-vs.bat | ||
env: | ||
|
@@ -151,8 +154,8 @@ jobs: | |
- name: Rename artifacts | ||
run: | | ||
mkdir temp | ||
move php-debug-pack-*.zip temp/PHP-Windows-x64-PM${{ matrix.pm-version-major }}-debugging-symbols.zip | ||
move php-*.zip temp/PHP-Windows-x64-PM${{ matrix.pm-version-major }}.zip | ||
move php-debug-pack-*.zip temp/PHP-Windows-x64-debugging-symbols.zip | ||
move php-*.zip temp/PHP-Windows-x64.zip | ||
move temp\*.zip . | ||
- name: Upload artifacts | ||
|
@@ -174,71 +177,50 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set version information | ||
id: version | ||
run: | | ||
echo PHP_VERSION=$(echo ${{ github.ref_name }} | cut -d / -f2) >> $GITHUB_OUTPUT | ||
- name: Update latest tag target | ||
run: | | ||
git tag -f php-${{ steps.version.outputs.PHP_VERSION }}-latest | ||
git push -f origin php-${{ steps.version.outputs.PHP_VERSION }}-latest | ||
git tag -f ${{ steps.version.outputs.PHP_VERSION }} | ||
git push -f origin ${{ steps.version.outputs.PHP_VERSION }} | ||
git tag -f ${{ steps.version.outputs.PHP_VERSION }}-pm5 | ||
git push -f origin ${{ steps.version.outputs.PHP_VERSION }}-pm5 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
|
||
- name: Generate release notes | ||
run: | | ||
echo "Last updated on **$(date -u +'%Y-%m-%d at %H:%M:%S %Z')**" > changelog.md | ||
echo -e "\n\n" >> changelog.md | ||
echo "Built by: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> changelog.md | ||
if [[ "${{ github.ref_name }}" != "${{ github.event.repository.default_branch }}" ]]; then | ||
echo -e "\n\n\n" >> changelog.md | ||
if [[ "${{ github.ref_name }}" == *"preview" ]]; then | ||
echo "# :warning: :radioactive: EXPERIMENTAL!!! :radioactive: :warning:" >> changelog.md | ||
echo "### Your server and/or plugins may crash or misbehave with this release!" >> changelog.md | ||
echo "### Consider downloading the [recommended release](${{ github.server_url }}/${{ github.repository }}/releases/latest) instead." >> changelog.md | ||
else | ||
echo ":warning: WARNING! :warning:" >> changelog.md | ||
echo "Some plugins might not work properly on this version yet." >> changelog.md | ||
echo "If you have problems, try the [recommended release](${{ github.server_url }}/${{ github.repository }}/releases/latest) instead." >> changelog.md | ||
fi | ||
else | ||
echo ":white_check_mark: This version is recommended for production servers." >> changelog.md | ||
fi | ||
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 | ||
- name: Update latest branch release | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: | | ||
${{ github.workspace }}/Linux-PM*/*.tar.gz | ||
${{ github.workspace }}/MacOS-PM*/*.tar.gz | ||
${{ github.workspace }}/Windows-PM*/*.zip | ||
${{ github.workspace }}/Linux-PM4/Linux.zip | ||
${{ github.workspace }}/MacOS-PM4/PHP-*.tar.gz | ||
${{ github.workspace }}/Windows-PM4/PHP-*.zip | ||
makeLatest: ${{ github.ref_name == github.event.repository.default_branch }} | ||
name: PHP ${{ steps.version.outputs.PHP_VERSION }} - Latest (Build ${{ github.run_number }}) | ||
tag: php-${{ steps.version.outputs.PHP_VERSION }}-latest | ||
name: PHP ${{ steps.version.outputs.PHP_VERSION }} for PM4 | ||
tag: ${{ steps.version.outputs.PHP_VERSION }} | ||
commit: ${{ github.sha }} | ||
allowUpdates: true | ||
bodyFile: ${{ github.workspace }}/changelog.md | ||
removeArtifacts: true | ||
prerelease: ${{ endsWith(github.ref_name, '-preview') }} | ||
|
||
- name: Publish unique release | ||
- name: Update latest branch release | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: | | ||
${{ github.workspace }}/Linux-PM*/*.tar.gz | ||
${{ github.workspace }}/MacOS-PM*/*.tar.gz | ||
${{ github.workspace }}/Windows-PM*/*.zip | ||
makeLatest: false | ||
name: PHP ${{ steps.version.outputs.PHP_VERSION }} (Build ${{ github.run_number }}) | ||
tag: php-${{ steps.version.outputs.PHP_VERSION }}-build-${{ github.run_number }} | ||
${{ github.workspace }}/Linux-PM5/Linux.zip | ||
${{ github.workspace }}/MacOS-PM5/PHP-*.tar.gz | ||
${{ github.workspace }}/Windows-PM5/PHP-*.zip | ||
makeLatest: ${{ github.ref_name == github.event.repository.default_branch }} | ||
name: PHP ${{ steps.version.outputs.PHP_VERSION }} for PM5 | ||
tag: ${{ steps.version.outputs.PHP_VERSION }}-pm5 | ||
commit: ${{ github.sha }} | ||
bodyFile: ${{ github.workspace }}/changelog.md | ||
prerelease: ${{ endsWith(github.ref_name, '-preview') }} | ||
|
||
allowUpdates: true | ||
removeArtifacts: true | ||
prerelease: ${{ endsWith(github.ref_name, '-preview') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
bin/ | ||
bin-debug/ | ||
install_data/ | ||
download_cache/ | ||
test.dSYM/ | ||
install.log | ||
temp_data/ | ||
compile.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.