Skip to content

Commit

Permalink
Add building of windows binaries to GitHub releases (#336)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
  • Loading branch information
realFlowControl and cmb69 authored Jan 29, 2025
1 parent 742fbaf commit c40c2c1
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Windows Releases
on:
release:
types: [published]

permissions:
contents: write

jobs:
get-extension-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.extension-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the extension matrix
id: extension-matrix
uses: php/php-windows-builder/extension-matrix@v1
with:
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4'
arch-list: 'x64, x86'
ts-list: 'ts'
build:
needs: get-extension-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build the extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
args: --with-parallel
libs: pthreads
release:
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'release' }}
steps:
- name: Upload artifact to the release
uses: php/php-windows-builder/release@v1
with:
release: ${{ github.event.release.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c40c2c1

Please # to comment.