Skip to content

Commit 45d17c1

Browse files
build: migrate to changesets
1 parent 6167944 commit 45d17c1

13 files changed

+889
-74
lines changed

.changeset/config.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@fingerprintjs/changesets-changelog-format",
5+
{
6+
"repo": "fingerprintjs/fingerprint-pro-server-api-php-sdk"
7+
}
8+
],
9+
"commit": false,
10+
"fixed": [],
11+
"linked": [],
12+
"access": "restricted",
13+
"baseBranch": "main",
14+
"updateInternalDependencies": "patch",
15+
"ignore": [],
16+
"privatePackages": {
17+
"version": true,
18+
"tag": true
19+
}
20+
}

.github/workflows/analyze-commits.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
name: Analyze Commit Messages
2-
on:
3-
pull_request:
2+
on: [pull_request]
43

54
permissions:
65
pull-requests: write
76
contents: write
87
jobs:
98
analyze-commits:
109
name: Analyze commits
11-
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
10+
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
11+
with:
12+
previewNotes: false
13+
14+
preview-changeset:
15+
name: Preview changeset
16+
uses: fingerprintjs/dx-team-toolkit/.github/workflows/preview-changeset-release.yml@v1
17+
with:
18+
pr-title: ${{ github.event.pull_request.title }}

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ name: 'Release'
22
on:
33
push:
44
branches:
5-
- develop
65
- main
76

87
jobs:
98
release:
10-
name: 'Publish new version'
11-
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-server-sdk.yml@v1
9+
name: 'Release project'
10+
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-sdk-changesets.yml@v1
1211
with:
12+
appId: ${{ vars.APP_ID }}
13+
version-command: bash ./changeset-version.sh
14+
publish-command: bash ./changeset-publish.sh
1315
language: php
1416
language-version: '8.3'
1517
prepare-command: |
1618
composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist
17-
appId: ${{ vars.APP_ID }}
1819
secrets:
1920
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}

.github/workflows/reset-prerelease-branch.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ release/yarn-error.log
99
release/node_modules
1010
.php-cs-fixer.cache
1111
cov/**/*.*
12-
!cov/**/.gitkeep
12+
!cov/**/.gitkeep
13+
**/node_modules

.releaserc.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Fingerprint Pro Server PHP SDK
2+
13
## [5.0.0](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/compare/v4.1.0...v5.0.0) (2024-09-09)
24

35

changeset-publish.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
bash ./scripts/generate.sh && pnpm exec changeset publish

changeset-version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
pnpm exec changeset version && bash ./scripts/generate.sh

contributing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,6 @@ Project configuration is described in the `config.json` file. To read about avai
6969
java -jar ./bin/swagger-codegen-cli.jar config-help -l php
7070
```
7171

72+
### How to publish
73+
74+
We use [changesets](https://github.com/changesets/changesets) for handling release notes. If there are relevant changes, please add them to changeset via `pnpm exec changeset`. You need to run `pnpm install` before doing so.

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "fingerprint-pro-server-api-php-sdk",
3+
"version": "5.0.0",
4+
"private": true,
5+
"devDependencies": {
6+
"@changesets/cli": "^2.27.8",
7+
"@fingerprintjs/changesets-changelog-format": "^0.2.0"
8+
}
9+
}

0 commit comments

Comments
 (0)