Skip to content

Commit 9f3eddf

Browse files
committed
feat: switch from release-it to changeset
1 parent e4488a6 commit 9f3eddf

File tree

9 files changed

+624
-1716
lines changed

9 files changed

+624
-1716
lines changed

.changeset/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in the repository](https://github.com/changesets/changesets).
6+
7+
## Usage
8+
9+
To add a new changeset, run `yarn changeset` in the root of the repository. This will prompt you to:
10+
11+
1. Select which packages have changed
12+
2. Choose a semver bump type (major / minor / patch) for each
13+
3. Write a summary of the changes
14+
15+
The changeset file will be committed with your PR.
16+
17+
When it's time to release, run:
18+
19+
```bash
20+
yarn changeset:version # Apply version bumps and generate changelogs
21+
yarn changeset:publish # Build and publish to npm
22+
```

.changeset/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "contentpass/react-native-contentpass" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "public",
11+
"baseBranch": "main",
12+
"updateInternalDependencies": "patch",
13+
"ignore": [],
14+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
15+
"onlyUpdatePeerDependentsWhenOutOfRange": true
16+
}
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@contentpass/react-native-contentpass": minor
3+
---
4+
5+
Introduce CMP adapter layer and UI components architecture

.changeset/new-cmp-onetrust.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@contentpass/react-native-contentpass-cmp-onetrust": minor
3+
---
4+
5+
Initial release of the OneTrust CMP adapter for Contentpass React Native SDK

.changeset/new-ui-components.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@contentpass/react-native-contentpass-ui": minor
3+
---
4+
5+
Initial release of the Contentpass React Native UI components

.github/workflows/release.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ on: workflow_dispatch
33

44
# See https://docs.npmjs.com/trusted-publishers
55
permissions:
6-
id-token: write # Required for OIDC
7-
contents: read
6+
id-token: write # Required for OIDC
7+
contents: write # Required for creating tags and GitHub releases
8+
pull-requests: write # Required for changesets to create release PRs
89

910
jobs:
1011
release:
@@ -24,10 +25,24 @@ jobs:
2425
git config --global user.email "dev@contentpass.de"
2526
git config --global user.name "Release Workflow"
2627
27-
- name: Log git status
28-
run: git status
28+
- name: Lint, test, typecheck
29+
run: |
30+
yarn lint
31+
yarn test
32+
yarn typecheck
33+
yarn prettier:check
34+
35+
- name: Build
36+
run: yarn build
2937

30-
- name: Run release
31-
run: yarn release --ci
38+
- name: Create release pull request or publish
39+
id: changesets
40+
uses: changesets/action@v1
41+
with:
42+
version: yarn changeset:version
43+
publish: yarn changeset:publish
44+
title: "chore: version packages"
45+
commit: "chore: version packages"
3246
env:
3347
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.release-it.json

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

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"prettier:check": "prettier --check \"**/*.{js,ts,tsx}\"",
1313
"clean": "del-cli packages/*/lib packages/*/android/build examples/*/android/build examples/*/android/app/build examples/*/ios/build",
1414
"build": "turbo run prepare",
15-
"release": "release-it"
15+
"changeset": "changeset",
16+
"changeset:version": "changeset version",
17+
"changeset:publish": "yarn build && changeset publish"
1618
},
1719
"keywords": [
1820
"contentpass",
@@ -35,20 +37,20 @@
3537
"access": "public"
3638
},
3739
"devDependencies": {
40+
"@changesets/changelog-github": "^0.5.2",
41+
"@changesets/cli": "^2.29.8",
3842
"@commitlint/config-conventional": "^20.4.1",
3943
"@eslint/eslintrc": "^3.3.0",
4044
"@evilmartians/lefthook": "^2.1.0",
4145
"@react-native-community/cli": "20.1.1",
4246
"@react-native/babel-preset": "0.83.1",
4347
"@react-native/eslint-config": "^0.83.1",
44-
"@release-it/conventional-changelog": "^10.0.4",
4548
"@testing-library/react-native": "^13.3.3",
4649
"@types/jest": "^30.0.0",
4750
"@types/lodash": "^4.17.23",
4851
"@types/react": "^19.2.10",
4952
"caniuse-lite": "^1.0.30001769",
5053
"commitlint": "^20.4.1",
51-
"conventional-changelog-angular": "^8.1.0",
5254
"del-cli": "^7.0.0",
5355
"eslint": "^9.39.2",
5456
"eslint-config-prettier": "^10.1.8",
@@ -62,7 +64,6 @@
6264
"react-native-builder-bob": "^0.40.17",
6365
"react-native-encrypted-storage": "^4.0.3",
6466
"react-test-renderer": "19.2.4",
65-
"release-it": "^19.2.4",
6667
"turbo": "^2.8.2",
6768
"typescript": "^5.9.3"
6869
},

0 commit comments

Comments
 (0)