File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish to Packagist
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ test :
10+ name : Run PHP tests
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Set up PHP
17+ uses : shivammathur/setup-php@v2
18+ with :
19+ php-version : ' 8.1'
20+ coverage : none
21+
22+ - name : Install dependencies
23+ run : composer install --no-interaction --no-progress --prefer-dist
24+
25+ - name : Run tests
26+ run : composer test
27+
28+ publish :
29+ name : Notify Packagist
30+ needs : test
31+ runs-on : ubuntu-latest
32+ if : startsWith(github.ref, 'refs/tags/')
33+ steps :
34+ - name : Call Packagist API
35+ run : |
36+ curl -sS -X POST \
37+ -H "Content-Type: application/json" \
38+ -d "{\"repository\":{\"url\":\"https://github.com/2captcha/2captcha-php\"}}" \
39+ "https://packagist.org/api/update-package?username=${{ secrets.PACKAGIST_USERNAME }}&apiToken=${{ secrets.PACKAGIST_API_TOKEN }}"
40+
You can’t perform that action at this time.
0 commit comments