From 0b677a4afbe09c103e2cc73e5b6e5bf77c23e3df Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 27 Nov 2024 19:10:25 +0000 Subject: [PATCH] Bring back archival builds these came in clutch today so I'm not too hasty to get rid of them. --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27e99f61..10efd483 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,3 +30,37 @@ jobs: 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.14.0 + with: + artifacts: | + ${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz + ${{ github.workspace }}/PHP-*-MacOS-*-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