Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: migrate to changesets #118

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@fingerprintjs/changesets-changelog-format",
{
"repo": "fingerprintjs/fingerprint-pro-server-api-php-sdk"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": true,
"tag": true
}
}
13 changes: 10 additions & 3 deletions .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Analyze Commit Messages
on:
pull_request:
on: [pull_request]

permissions:
pull-requests: write
contents: write
jobs:
analyze-commits:
name: Analyze commits
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
with:
previewNotes: false

preview-changeset:
name: Preview changeset
uses: fingerprintjs/dx-team-toolkit/.github/workflows/preview-changeset-release.yml@v1
with:
pr-title: ${{ github.event.pull_request.title }}
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: 'Release'
on:
push:
branches:
- develop
- main

jobs:
release:
name: 'Publish new version'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-server-sdk.yml@v1
name: 'Release project'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-sdk-changesets.yml@v1
with:
appId: ${{ vars.APP_ID }}
version-command: bash ./changeset-version.sh
publish-command: bash ./changeset-publish.sh
language: php
language-version: '8.3'
prepare-command: |
composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist
appId: ${{ vars.APP_ID }}
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
12 changes: 0 additions & 12 deletions .github/workflows/reset-prerelease-branch.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ release/yarn-error.log
release/node_modules
.php-cs-fixer.cache
cov/**/*.*
!cov/**/.gitkeep
!cov/**/.gitkeep
**/node_modules
51 changes: 0 additions & 51 deletions .releaserc.js

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Fingerprint Pro Server PHP SDK

## [5.0.0](https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/compare/v4.1.0...v5.0.0) (2024-09-09)


Expand Down
2 changes: 2 additions & 0 deletions changeset-publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
bash ./scripts/generate.sh && pnpm exec changeset publish
2 changes: 2 additions & 0 deletions changeset-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
pnpm exec changeset version && bash ./scripts/generate.sh
3 changes: 3 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ Project configuration is described in the `config.json` file. To read about avai
java -jar ./bin/swagger-codegen-cli.jar config-help -l php
```

### How to publish

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.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "fingerprint-pro-server-api-php-sdk",
"version": "5.0.0",
"private": true,
"devDependencies": {
"@changesets/cli": "^2.27.8",
"@fingerprintjs/changesets-changelog-format": "^0.2.0"
}
}
Loading
Loading