Skip to content

Commit 342a258

Browse files
author
Sterling
committed
Add Packagist auto-update workflow
1 parent 69a4085 commit 342a258

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Update Packagist
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify Packagist
12+
if: ${{ vars.PACKAGIST_USERNAME != '' }}
13+
run: |
14+
curl -s -X POST "https://packagist.org/api/update-package?username=${{ vars.PACKAGIST_USERNAME }}&apiToken=${{ secrets.PACKAGIST_API_TOKEN }}" \
15+
-d '{"repository":{"url":"https://github.com/hdresearch/php-sdk"}}' \
16+
-H "Content-Type: application/json"
17+
echo "✅ Packagist notified"

0 commit comments

Comments
 (0)