Skip to content

Commit 93cbd44

Browse files
authored
Merge pull request #13 from starknet-community-libs/feature/ci
introduce CI
2 parents 0bdbcb1 + 7bbb6c3 commit 93cbd44

19 files changed

+2620
-196
lines changed

.commitlintrc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
],
5+
"rules": {
6+
"body-max-line-length": [
7+
0,
8+
"always",
9+
100
10+
],
11+
"footer-max-line-length": [
12+
0,
13+
"always",
14+
100
15+
],
16+
"footer-leading-blank": [
17+
0,
18+
"always",
19+
100
20+
]
21+
}
22+
}

.github/workflows/pr.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
- develop
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup Node
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: "14"
17+
- run: yarn install --frozen-lockfile
18+
- run: yarn build

.github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Semantic Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup Node
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: "14"
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn build
22+
- env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
25+
run: npx semantic-release

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,5 @@ out
159159
.yarn/install-state.gz
160160
.pnp.*
161161

162+
# build
163+
dist

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

.releaserc

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"branches": [
3+
"master",
4+
{
5+
"name": "develop",
6+
"channel": "next"
7+
}
8+
],
9+
"plugins": [
10+
"@semantic-release/commit-analyzer",
11+
"@semantic-release/release-notes-generator",
12+
"@semantic-release/changelog",
13+
"@semantic-release/npm",
14+
[
15+
"@semantic-release/git",
16+
{
17+
"assets": [
18+
"package.json",
19+
"package-lock.json",
20+
"yarn.lock",
21+
"CHANGELOG.md"
22+
],
23+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
24+
}
25+
],
26+
"@semantic-release/github"
27+
],
28+
"repositoryUrl": "https://github.com/starknet-community-libs/get-starknet"
29+
}

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# get-starknet<br/>StarkNet wallet <-> dApp bridge
22

3+
[![npm](https://img.shields.io/npm/v/get-starknet.svg)](https://www.npmjs.com/package/get-starknet)
4+
35
## Alpha version
46

57
## Goals

dist/configs/defaultWallet.d.ts

-3
This file was deleted.

dist/configs/lastConnected.d.ts

-3
This file was deleted.

dist/configs/storageWrapper.d.ts

-9
This file was deleted.

dist/discovery/index.d.ts

-3
This file was deleted.

dist/index.d.ts

-5
This file was deleted.

dist/index.js

-2
This file was deleted.

dist/index.js.map

-1
This file was deleted.

dist/modal/index.d.ts

-3
This file was deleted.

dist/types.d.ts

-126
This file was deleted.

dist/utils.d.ts

-12
This file was deleted.

package.json

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"scripts": {
10+
"prepare": "npm run build && husky install",
1011
"build": "rollup -c",
1112
"dev": "rollup -c -w"
1213
},
@@ -28,14 +29,22 @@
2829
},
2930
"devDependencies": {
3031
"@rollup/plugin-commonjs": "^22.0.0",
32+
"@commitlint/cli": "^16.2.3",
33+
"@commitlint/config-conventional": "^16.2.1",
3134
"@rollup/plugin-node-resolve": "^13.1.3",
3235
"@rollup/plugin-typescript": "^8.3.1",
36+
"@semantic-release/changelog": "^6.0.1",
37+
"@semantic-release/commit-analyzer": "^9.0.2",
38+
"@semantic-release/git": "^10.0.1",
39+
"@semantic-release/npm": "^9.0.1",
40+
"@semantic-release/release-notes-generator": "^10.0.3",
3341
"@tsconfig/svelte": "^3.0.0",
3442
"@typescript-eslint/eslint-plugin": "^5.17.0",
3543
"@typescript-eslint/parser": "^5.17.0",
3644
"eslint": "^8.12.0",
3745
"eslint-config-prettier": "^8.5.0",
3846
"eslint-plugin-prettier": "^4.0.0",
47+
"husky": "^7.0.4",
3948
"postcss": "^8.4.12",
4049
"prettier": "^2.6.1",
4150
"prettier-plugin-svelte": "^2.6.0",

0 commit comments

Comments
 (0)