Skip to content

Commit 150ed01

Browse files
committed
chore: add autopublish with yarn, for now
1 parent dbc2058 commit 150ed01

5 files changed

Lines changed: 18 additions & 24 deletions

File tree

.github/workflows/publish-auto.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ jobs:
1919
needs: test
2020
uses: Kingstinct/utils/.github/workflows/publish.yml@main
2121
secrets:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
2323
npm_token: ${{ secrets.npm_token }}
2424
with:
2525
description: Autorelease
2626
release_type: patch
27+
package_manager: yarn

.github/workflows/test.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,17 @@ jobs:
2828
- uses: actions/checkout@v3
2929
id: checkout
3030

31-
- uses: pnpm/action-setup@v2
32-
3331
- name: Setup Node.js environment
3432
uses: actions/setup-node@v3
3533
id: setup
3634
with:
37-
cache: pnpm
35+
cache: yarn
3836
node-version-file: .nvmrc
3937

4038
- name: Install deps
4139
id: install
4240
if: ${{ steps.setup.outputs.cache-hit == false }}
43-
run: pnpm install --frozen-lockfile
41+
run: yarn install --frozen-lockfile
4442

4543
# This workflow contains a single job called "build"
4644
test:
@@ -56,21 +54,19 @@ jobs:
5654
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
5755
- uses: actions/checkout@v3
5856

59-
- uses: pnpm/action-setup@v2
60-
6157
- name: Setup Node.js environment
6258
uses: actions/setup-node@v3
6359
id: setup
6460
with:
65-
cache: pnpm
61+
cache: yarn
6662
node-version-file: .nvmrc
6763

6864
- name: Install deps
6965
id: install
70-
run: pnpm install --frozen-lockfile
66+
run: yarn install --frozen-lockfile
7167

7268
- name: Test
73-
run: pnpm test-only
69+
run: yarn test-only
7470

7571
typecheck:
7672
# The type of runner that the job will run on
@@ -86,21 +82,19 @@ jobs:
8682
- uses: actions/checkout@v3
8783
id: checkout
8884

89-
- uses: pnpm/action-setup@v2
90-
9185
- name: Setup Node.js environment
9286
uses: actions/setup-node@v3
9387
id: setup
9488
with:
95-
cache: pnpm
89+
cache: yarn
9690
node-version-file: .nvmrc
9791

9892
- name: Install deps
9993
id: install
100-
run: pnpm install --frozen-lockfile
94+
run: yarn install --frozen-lockfile
10195

10296
- name: Typecheck
103-
run: pnpm typecheck
97+
run: yarn typecheck
10498

10599
lint:
106100
# The type of runner that the job will run on
@@ -116,18 +110,16 @@ jobs:
116110
- uses: actions/checkout@v3
117111
id: checkout
118112

119-
- uses: pnpm/action-setup@v2
120-
121113
- name: Setup Node.js environment
122114
uses: actions/setup-node@v3
123115
id: setup
124116
with:
125-
cache: pnpm
117+
cache: yarn
126118
node-version-file: .nvmrc
127119

128120
- name: Install deps
129121
id: install
130-
run: pnpm install --frozen-lockfile
122+
run: yarn install --frozen-lockfile
131123

132124
- name: Lint
133-
run: pnpm lint-only
125+
run: yarn lint-only

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
pnpm lint-staged
4+
yarn lint-staged

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
pnpm test
4+
yarn test

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"ios": "cp index.expo.js index.js && expo run:ios",
2020
"web": "cp index.expo.js index.js && expo start --web",
2121
"build": " rimraf utils primitives hooks contexts components stories && tsc --declaration -p ./tsconfig.build.json",
22-
"test": "concurrently \"yarn test-only\" \"yarn lint\" \"tsc --noEmit\"",
22+
"test": "concurrently \"yarn test-only\" \"yarn lint\" \"yarn typecheck\"",
23+
"typecheck": "tsc --noEmit",
2324
"test-only": "jest",
2425
"lint": "eslint . --cache",
2526
"prepare": "husky install",
@@ -33,7 +34,7 @@
3334
"*.js": "eslint --fix",
3435
"*.json": "eslint --fix",
3536
"*.graphql": "eslint --fix",
36-
"*.yml": "eslint --fix"
37+
"*.yml": "eslint"
3738
},
3839
"publishConfig": {
3940
"access": "public",

0 commit comments

Comments
 (0)