Skip to content

Commit afadbfc

Browse files
added changesets
1 parent 2fe5506 commit afadbfc

File tree

8 files changed

+1420
-30
lines changed

8 files changed

+1420
-30
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/config@2.3.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Ensures packages build correctly
2+
name: Build Packages
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
build:
9+
name: Build Packages
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 18
20+
cache: "yarn"
21+
22+
- name: Setup Yarn
23+
run: |
24+
npm install -g yarn
25+
echo "Yarn version: $(yarn -v)"
26+
27+
- name: Install Dependencies
28+
run: yarn install --frozen-lockfile
29+
30+
- name: Build
31+
run: yarn build
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Action to publish packages under the `next` tag for testing
2+
# Packages are versioned as `0.0.0-dev.{short-sha}`
3+
name: Packages Deploy
4+
5+
on: workflow_dispatch
6+
7+
jobs:
8+
publish:
9+
name: Publish Dev Packages
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: 18
20+
21+
- name: Setup Yarn
22+
run: |
23+
npm install -g yarn
24+
echo "Yarn version: $(yarn -v)"
25+
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
26+
27+
- name: Install Dependencies
28+
run: yarn install --frozen-lockfile
29+
30+
- name: Build
31+
run: yarn build:packages
32+
33+
- name: Development Version
34+
run: |
35+
yarn changeset version --no-git-tag --snapshot dev
36+
yarn changeset publish --tag dev

.changeset/workflows/release.yml

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

bump-version.sh

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

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"example": "yarn --cwd example",
3737
"pods": "cd example/ios && bundle exec pod install",
3838
"bootstrap": "yarn example && yarn && yarn pods",
39-
"bump": "./bump-version.sh"
39+
"release": "yarn build && yarn changeset publish"
4040
},
4141
"keywords": [
4242
"react-native",
@@ -80,5 +80,8 @@
8080
}
8181
]
8282
]
83+
},
84+
"dependencies": {
85+
"@changesets/cli": "^2.26.2"
8386
}
8487
}

0 commit comments

Comments
 (0)