Skip to content

Commit 7b2ac78

Browse files
committed
add changesets
1 parent cdb3a4f commit 7b2ac78

File tree

6 files changed

+507
-10
lines changed

6 files changed

+507
-10
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v3
20+
21+
- name: Enable Corepack
22+
run: corepack enable
23+
24+
- name: Setup Node.js 20.x
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 20.x
28+
29+
- name: Install Dependencies
30+
run: yarn
31+
32+
- name: Create Release Pull Request or Publish to npm
33+
id: changesets
34+
uses: changesets/action@v1
35+
with:
36+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
37+
version: yarn changeset version
38+
publish: yarn release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_PHANTOM_SECURITY_BOT }}

VERSIONING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Versioning and Publishing Packages
2+
3+
We use Changesets for versioning and GitHub Actions for publishing. The process is as follows:
4+
5+
1. After making changes, create a changeset locally:
6+
7+
```
8+
yarn changeset
9+
```
10+
11+
2. Follow the prompts to describe your changes and select the appropriate version bump.
12+
3. Commit the generated changeset file along with your code changes.
13+
14+
4. Push your changes and open a pull request:
15+
16+
```
17+
git push
18+
```
19+
20+
5. The pull request should contain your code changes and the new changeset file(s).
21+
22+
6. Once the pull request is merged to the main branch, the CI/CD pipeline (GitHub Actions) will automatically:
23+
24+
- Create a new "Version Packages" pull request that includes version bumps and changelog updates
25+
26+
7. Review the "Version Packages" pull request:
27+
28+
- Check that the version bumps and changelog entries are correct
29+
- Make any necessary adjustments
30+
- Approve the pull request
31+
32+
8. Merge the "Version Packages" pull request:
33+
34+
- This triggers the publish workflow
35+
36+
9. The publish workflow will automatically:
37+
- Publish the updated packages to our npm registry
38+
- Push the new version tags to the repository

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@phantom/react-native-webview",
3-
"description": "Phantom's fork ofReact Native WebView component for iOS, Android, macOS, and Windows",
3+
"description": "Phantom's fork of react-native-webview, based off of [email protected]",
44
"main": "index.js",
55
"main-internal": "src/index.ts",
66
"react-native": "src/index.ts",
@@ -12,7 +12,7 @@
1212
"Napas Udomsak <[email protected]>"
1313
],
1414
"license": "MIT",
15-
"version": "13.13.5-phantom.1",
15+
"version": "0.0.1",
1616
"homepage": "https://github.com/phantom/react-native-webview#readme",
1717
"scripts": {
1818
"android": "react-native run-android",
@@ -47,6 +47,7 @@
4747
"@babel/core": "^7.20.0",
4848
"@babel/runtime": "^7.20.0",
4949
"@callstack/react-native-visionos": "0.73.8",
50+
"@changesets/cli": "^2.29.2",
5051
"@react-native/babel-preset": "0.73.21",
5152
"@react-native/eslint-config": "0.73.2",
5253
"@react-native/metro-config": "0.73.5",

0 commit comments

Comments
 (0)