|
30 | 30 | special-release: ${{ matrix.special-release || 'none' }}
|
31 | 31 | pm-preview: ${{ matrix.pm-preview || false }}
|
32 | 32 | secrets: inherit
|
| 33 | + |
| 34 | + publish-archive-release: |
| 35 | + name: Publish archive release |
| 36 | + needs: [all-builds] |
| 37 | + runs-on: ubuntu-20.04 |
| 38 | + if: ${{ github.ref_name == 'stable' && github.ref_type == 'branch' && !contains(github.event.head_commit.message, '[no release]') }} |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Download artifacts |
| 42 | + uses: actions/download-artifact@v4 |
| 43 | + with: |
| 44 | + path: ${{ github.workspace }} |
| 45 | + |
| 46 | + - name: Generate release notes |
| 47 | + run: | |
| 48 | + echo "Built by: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> changelog.md |
| 49 | + echo "Build number: ${{ github.run_number }}" >> changelog.md |
| 50 | + echo -e "\n\n\n" >> changelog.md |
| 51 | + 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 |
| 52 | + 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 |
| 53 | + echo -e "\n\n\n" >> changelog.md |
| 54 | +
|
| 55 | + - name: Create release |
| 56 | + uses: ncipollo/release-action@v1.14.0 |
| 57 | + with: |
| 58 | + artifacts: | |
| 59 | + ${{ github.workspace }}/PHP-*-Linux-PM*/*.tar.gz |
| 60 | + ${{ github.workspace }}/PHP-*-MacOS-*-PM*/*.tar.gz |
| 61 | + ${{ github.workspace }}/PHP-*-Windows-PM*/*.zip |
| 62 | + name: PHP (Build ${{ github.run_number }}) - Archive |
| 63 | + tag: php-build-${{ github.run_number }} |
| 64 | + commit: ${{ github.sha }} |
| 65 | + allowUpdates: false |
| 66 | + bodyFile: ${{ github.workspace }}/changelog.md |
0 commit comments