Skip to content

Commit 23d0cd5

Browse files
committed
ci: upload files to repository
1 parent 6a20de2 commit 23d0cd5

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,39 @@ jobs:
4242
run: |
4343
install-php-extensions ${{ matrix.extension }}
4444
45+
- name: Retrieve extension version
46+
id: extension_version
47+
run: |
48+
php -r 'echo "extension_version=" . phpversion("${{ matrix.extension }}");' >> "$GITHUB_OUTPUT"
49+
4550
- name: Archive extension
4651
uses: actions/upload-artifact@v4
4752
with:
48-
name: ext-${{ matrix.extension }}-php-${{ matrix.php_version }}
53+
name: ext-${{ matrix.extension }}-v${{ steps.extension_version.outputs.extension_version }}-php-${{ matrix.php_version }}
4954
path: ${{ steps.extension_dir.outputs.extension_dir }}/${{ matrix.extension }}.so
55+
retention-days: 1
56+
57+
upload:
58+
runs-on: ubuntu-latest
59+
needs:
60+
- build
61+
permissions:
62+
contents: write
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- uses: actions/download-artifact@v4
67+
with:
68+
path: artifacts
69+
70+
- name: Merge extensions
71+
run: |
72+
rsync -a artifacts/ extensions/
73+
74+
- name: Commit changes
75+
run: |
76+
git config user.name "github-actions[bot]"
77+
git config user.email "github-actions[bot]@users.noreply.github.com"
78+
git add extensions
79+
git commit --no-interactive -m "chore: update extensions"
80+
git push

0 commit comments

Comments
 (0)