Skip to content

Commit

Permalink
build: migrate to changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Oct 2, 2024
1 parent a3b2645 commit 69f5eb8
Show file tree
Hide file tree
Showing 13 changed files with 888 additions and 75 deletions.
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-go-sdk"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": true,
"tag": true
}
}
11 changes: 9 additions & 2 deletions .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Analyze Commit Messages
on:
pull_request:
on: [pull_request]

permissions:
pull-requests: write
Expand All @@ -9,3 +8,11 @@ jobs:
analyze-commits:
name: Generate docs and coverage report
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 @@ -4,14 +4,15 @@ on:
push:
branches:
- main
- develop

jobs:
release:
name: 'Build project, run CI checks and publish new release'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-server-sdk.yml@v1
with:
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: java
language-version: '11'
java-version: '11'
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/reset-prerelease-branch.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ build
.env
.DS_Store
.openapi-generator
release/node_modules
**/node_modules
52 changes: 0 additions & 52 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 Java SDK

## [6.1.0](https://github.com/fingerprintjs/fingerprint-pro-server-api-java-sdk/compare/v6.0.2...v6.1.0) (2024-09-11)


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 && bash ./gradlew publishToMavenLocal
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
4 changes: 4 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ Project configuration is described in `config.yaml` file. To read about availabl
```shell
java -jar ./bin/generator.jar config-help -l java
```

### 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-java-sdk",
"version": "6.1.0",
"private": true,
"devDependencies": {
"@changesets/cli": "^2.27.8",
"@fingerprintjs/changesets-changelog-format": "^0.2.0"
}
}
Loading

0 comments on commit 69f5eb8

Please sign in to comment.