diff --git a/.github/workflows/build-php-extension.yml b/.github/workflows/build-php-extension.yml new file mode 100644 index 0000000..ed20372 --- /dev/null +++ b/.github/workflows/build-php-extension.yml @@ -0,0 +1,41 @@ +name: Build extension +on: + release: + types: [published] + # create: # Uncomment this to run on tag/branch creation + # pull_request: # Uncomment this to run on pull requests +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 + 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 }} + 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.PHP_TOKEN }} diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ce9446e..7d23ab2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -1,10 +1,7 @@ name: Build PHP on: - workflow_dispatch: - inputs: - php-version: - description: 'PHP version to build' - required: true + release: + types: [published] jobs: php: strategy: @@ -23,12 +20,12 @@ jobs: arch: ${{ matrix.arch }} ts: ${{ matrix.ts }} - artifacts: + release: runs-on: ubuntu-latest - needs: php + if: ${{ github.event_name == 'release' }} steps: - - name: Upload artifacts - uses: actions/upload-artifact/merge@v4 + - name: Upload artifact to the release + uses: php/php-windows-builder/release@v1 with: - name: artifacts - delete-merged: true \ No newline at end of file + release: ${{ github.event.release.tag_name }} + token: ${{ secrets.PHP_TOKEN }} diff --git a/.github/workflows/php8.3.2.yml b/.github/workflows/php8.3.2.yml new file mode 100644 index 0000000..0e45062 --- /dev/null +++ b/.github/workflows/php8.3.2.yml @@ -0,0 +1,20 @@ +name: Build PHP 8.3.2 +on: + workflow_dispatch: +jobs: + php: + strategy: + matrix: + arch: [x64] + ts: [nts] + runs-on: windows-2019 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build + uses: php/php-windows-builder/php@v1 + with: + php-version: '8.3.2' + arch: ${{ matrix.arch }} + ts: ${{ matrix.ts }}