Skip to content

Commit e169476

Browse files
authored
chore: notify packagist (#2)
1 parent e1598f6 commit e169476

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/packagist.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Packagist
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
ci:
10+
name: Notify Packagist
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Notify
17+
shell: bash
18+
env:
19+
PACKAGIST_USERNAME: ${{ secrets.PACKAGIST_USERNAME }}
20+
PACKAGIST_API_TOKEN: ${{ secrets.PACKAGIST_API_TOKEN }}
21+
run: |
22+
echo "Notifying Packagist of new release: ${{ github.event.release.tag_name }}"
23+
24+
curl -X POST -H 'content-type:application/json' \
25+
"https://packagist.org/api/update-package?username=$PACKAGIST_USERNAME&apiToken=$PACKAGIST_API_TOKEN" \
26+
-d '{"repository":{"url":"https://packagist.org/packages/featurevisor/featurevisor-php"}}'

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ This SDK is compatible with [Featurevisor](https://featurevisor.com/) v2.0 proje
4343
- [Test](#test)
4444
- [Benchmark](#benchmark)
4545
- [Assess distribution](#assess-distribution)
46+
- [Development of this package](#development-of-this-package)
47+
- [Setting up](#setting-up)
48+
- [Running tests](#running-tests)
49+
- [Releasing](#releasing)
4650
- [License](#license)
4751

4852
## Installation
@@ -673,6 +677,28 @@ See: https://featurevisor.com/docs/cli/#assess-distribution
673677

674678
@TODO
675679

680+
## Development of this package
681+
682+
### Setting up
683+
684+
Clone the repository, and install the dependencies using [Composer](https://getcomposer.org/):
685+
686+
```
687+
$ composer install
688+
```
689+
690+
### Running tests
691+
692+
```
693+
$ composer test
694+
```
695+
696+
### Releasing
697+
698+
- Manually create a new release on [GitHub](https://github.com/featurevisor/featurevisor-php/releases)
699+
- Tag it with a prefix of `v`, like `v1.0.0`
700+
- GitHub Actions is set up to automatically notify [Packagist](https://packagist.org/packages/featurevisor/featurevisor-php) about the new release
701+
676702
## License
677703

678704
MIT © [Fahad Heylaal](https://fahad19.com)

0 commit comments

Comments
 (0)