Skip to content

Commit c40c2c1

Browse files
Add building of windows binaries to GitHub releases (#336)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
1 parent 742fbaf commit c40c2c1

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/windows-release.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Windows Releases
2+
on:
3+
release:
4+
types: [published]
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
get-extension-matrix:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
matrix: ${{ steps.extension-matrix.outputs.matrix }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Get the extension matrix
18+
id: extension-matrix
19+
uses: php/php-windows-builder/extension-matrix@v1
20+
with:
21+
php-version-list: '8.0, 8.1, 8.2, 8.3, 8.4'
22+
arch-list: 'x64, x86'
23+
ts-list: 'ts'
24+
build:
25+
needs: get-extension-matrix
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Build the extension
33+
uses: php/php-windows-builder/extension@v1
34+
with:
35+
php-version: ${{ matrix.php-version }}
36+
arch: ${{ matrix.arch }}
37+
ts: ${{ matrix.ts }}
38+
args: --with-parallel
39+
libs: pthreads
40+
release:
41+
runs-on: ubuntu-latest
42+
needs: build
43+
if: ${{ github.event_name == 'release' }}
44+
steps:
45+
- name: Upload artifact to the release
46+
uses: php/php-windows-builder/release@v1
47+
with:
48+
release: ${{ github.event.release.tag_name }}
49+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)