Skip to content

Commit b9d7fbf

Browse files
committed
Add jobs to upload to downloads server
1 parent 9ffe742 commit b9d7fbf

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/pecl.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,14 @@ jobs:
119119
else
120120
gh release upload pecl $extension-${{ inputs.extension-ref }}.zip -R ${{ github.repository }} --clobber
121121
fi
122+
upload:
123+
runs-on: ubuntu-latest
124+
needs: pecl-release
125+
steps:
126+
- name: Upload to downloads server
127+
run: |
128+
extension=$(basename "${{ inputs.extension-url }}")
129+
url="https://github.com/${{ github.repository }}/releases/download/pecl/$extension-${{ inputs.extension-ref }}.zip"
130+
gh workflow run pecl.yml -R php/web-downloads -f url="$url" -f extension="$extension" -f ref="${{ inputs.extension-ref }}"
131+
env:
132+
GITHUB_TOKEN: ${{ secrets.TOKEN }}

.github/workflows/php.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
php-version:
77
description: 'PHP version to build'
88
required: true
9+
910
jobs:
1011
php:
1112
strategy:
@@ -27,9 +28,22 @@ jobs:
2728
artifacts:
2829
runs-on: ubuntu-latest
2930
needs: php
31+
outputs:
32+
artifact-id: ${{ steps.artifacts.outputs.artifact-id }}
3033
steps:
3134
- name: Upload artifacts
3235
uses: actions/upload-artifact/merge@v4
36+
id: artifacts
3337
with:
3438
name: artifacts
35-
delete-merged: true
39+
delete-merged: true
40+
upload:
41+
runs-on: ubuntu-latest
42+
needs: artifacts
43+
steps:
44+
- name: Upload to downloads server
45+
run: |
46+
url="https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${{ needs.artifacts.outputs.artifact-id }}/zip"
47+
gh workflow run php.yml -R php/web-downloads -f url="$url"
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 commit comments

Comments
 (0)