Skip to content

Commit dabf972

Browse files
committed
feat: Add changesets & Replace release-it
1 parent 84bcc23 commit dabf972

File tree

6 files changed

+1730
-3115
lines changed

6 files changed

+1730
-3115
lines changed

.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/changelog-github", { "repo": "scio-labs/use-inkathon" }],
4+
"commit": true,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: Release
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [18]
18+
pnpm-version: [8.8]
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v3
22+
with:
23+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24+
fetch-depth: 0
25+
submodules: true
26+
27+
- name: Set up pnpm action ${{ matrix.pnpm-version }}
28+
uses: pnpm/action-setup@v2
29+
with:
30+
version: ${{ matrix.pnpm-version }}
31+
32+
- name: Set up Node ${{ matrix.node-version }}
33+
uses: actions/setup-node@v3
34+
with:
35+
cache: 'pnpm'
36+
node-version: ${{ matrix.node-version }}
37+
38+
- name: Install Dependencies
39+
run: pnpm install --lockfile-only
40+
41+
- name: Create Release Pull Request
42+
uses: changesets/action@v1
43+
with:
44+
title: 'chore(changeset): Bump package version'
45+
commit: 'chore(changeset): Bump package version'
46+
version: pnpm run changeset:version
47+
publish: pnpm run changeset:publish
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.CHANGESETS_PAT }}
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16
1+
v18

.release-it.json

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

package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,36 @@
2828
"dist"
2929
],
3030
"scripts": {
31-
"build": "tsup && pnpm typedoc",
32-
"typedoc": "typedoc src/index.ts --titleLink \"https://github.com/scio-labs/use-inkathon\"",
3331
"dev": "tsup --watch",
3432
"lint": "prettier . --check && pnpm eslint",
3533
"lint:fix": "prettier . --write && pnpm eslint --fix",
36-
"prepare": "husky install"
34+
"build": "tsup",
35+
"typedoc": "typedoc src/index.ts --titleLink \"https://github.com/scio-labs/use-inkathon\"",
36+
"changeset:version": "pnpm run typedoc && changeset version",
37+
"changeset:publish": "pnpm run build && changeset publish"
3738
},
3839
"peerDependencies": {
39-
"@polkadot/api": ">=9.14.0",
40-
"@polkadot/api-contract": ">=9.14.0",
41-
"@polkadot/extension-inject": ">=0.44.0",
42-
"@polkadot/types": ">=9.14.0",
43-
"@polkadot/util": ">=10.4.0",
44-
"react": ">=18.0.0",
45-
"react-dom": ">=18.0.0"
40+
"@polkadot/api": ">=10",
41+
"@polkadot/api-contract": ">=10",
42+
"@polkadot/extension-inject": ">=0.46",
43+
"@polkadot/types": ">=10",
44+
"@polkadot/util": ">=10",
45+
"react": ">=18",
46+
"react-dom": ">=18"
4647
},
4748
"devDependencies": {
49+
"@changesets/changelog-github": "^0.4.8",
50+
"@changesets/cli": "^2.26.2",
4851
"@types/node": "^18.17.14",
4952
"@types/react": "^18.2.21",
50-
"@typescript-eslint/eslint-plugin": "^5.62.0",
51-
"@typescript-eslint/parser": "^5.62.0",
53+
"@typescript-eslint/eslint-plugin": "^6.7.5",
54+
"@typescript-eslint/parser": "^6.7.5",
5255
"eslint": "^8.48.0",
53-
"eslint-config-prettier": "^8.10.0",
56+
"eslint-config-prettier": "^9.0.0",
5457
"eslint-plugin-react": "^7.33.2",
5558
"husky": "^8.0.3",
56-
"lint-staged": "^14.0.1",
57-
"prettier": "^2.8.8",
58-
"release-it": "^16.1.5",
59+
"lint-staged": "^15.0.1",
60+
"prettier": "^3.0.3",
5961
"tsup": "^7.2.0",
6062
"typedoc": "^0.25.1",
6163
"typescript": "^5.2.2"

0 commit comments

Comments
 (0)