Skip to content
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
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
Comment thread
hurali97 marked this conversation as resolved.
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["inspector-example"]
}
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ jobs:
- name: Typecheck files
run: yarn typecheck

test:
runs-on: ubuntu-latest
# test:
# runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# steps:
# - name: Checkout
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Setup
uses: ./.github/actions/setup
# - name: Setup
# uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage
# - name: Run unit tests
# run: yarn test --maxWorkers=2 --coverage
Comment thread
hurali97 marked this conversation as resolved.

build-library:
runs-on: ubuntu-latest
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release
on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
id-token: write # Required for npm provenance (OIDC)
contents: write # Required to push tags and create GitHub releases
pull-requests: write # Required to create PR with Changeset release

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0

- name: Setup
uses: ./.github/actions/setup

- name: Build packages
run: yarn build

- name: Create version PR or publish package
uses: changesets/action@9f2f0d5b6aa7a1f1d2d8b4a3a8ef4f5f4d9d7c4a # v1
with:
version: yarn ci:version
publish: yarn ci:publish
commit: 'chore: version packages'
title: 'chore: version packages'
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,35 @@ The root `package.json` file contains script delegates for common tasks:
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with [ESLint](https://eslint.org/).
- `yarn test`: run unit tests with [Jest](https://jestjs.io/).
- `yarn changeset`: create or update a Changeset for release notes and versioning.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.

### Changesets workflow

Use [Changesets](https://github.com/changesets/changesets) to describe user-facing changes and prepare releases for the packages.

#### For contributors

- Add a Changeset for pull requests that change the public API, native behavior, runtime behavior, or developer-facing usage.
- You can usually skip a Changeset for changes that are purely internal, such as CI tweaks, refactors with no observable impact, or documentation-only updates.
- Run the following command from the repository root:

```sh
yarn changeset
```

- When prompted, select `@callstack/inspector` or `@callstack/inspector-cli`. Do not select the private example workspace.
- Choose the appropriate bump level (`patch`, `minor`, or `major`) and write a short summary of the user-facing change.
- Commit the generated file in `.changeset/` with the rest of your pull request.

#### For maintainers

- Pull requests merged to `main` with pending Changesets will cause the release workflow to open or update a Version Packages pull request.
- Review that release pull request carefully because it contains the generated version bump and changelog updates that will be published.
- After the Version Packages pull request is merged, the release workflow will build the package and publish it to npm automatically.

### Sending a pull request

> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
Expand All @@ -115,5 +140,6 @@ When you're sending a pull request:
- Prefer small pull requests focused on one change.
- Verify that linters and tests are passing.
- Review the documentation to make sure it looks good.
- Add a Changeset when the pull request introduces a user-facing change.
- Follow the pull request template when opening a pull request.
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ npx inspector -h
## Contributing

- [Development workflow](CONTRIBUTING.md#development-workflow)
- [Changesets workflow](CONTRIBUTING.md#changesets-workflow)
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
- [Code of conduct](CODE_OF_CONDUCT.md)

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
"test": "yarn workspace @callstack/inspector test",
"build:android": "yarn turbo run build:android",
"build:ios": "yarn turbo run build:ios",
"build": "yarn turbo run build"
"build": "yarn turbo run build",
"ci:version": "changeset version && yarn install --no-immutable",
"ci:publish": "yarn workspaces foreach --no-private -At npm publish && changeset tag"
Comment thread
hurali97 marked this conversation as resolved.
},
"devDependencies": {
"@changesets/cli": "^2.31.0",
"@commitlint/config-conventional": "^20.5.0",
"babel-plugin-module-resolver": "5.0.2",
"commitlint": "^20.5.0",
Expand Down
Loading
Loading