Skip to content

Commit b836c30

Browse files
committed
Add workflow
1 parent 5af3995 commit b836c30

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on: [push]
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Prepare repository
13+
run: git fetch --unshallow --tags
14+
15+
- name: Use Node.js 14.x
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 14.x
19+
20+
- name: Cache node modules
21+
uses: actions/cache@v1
22+
with:
23+
path: node_modules
24+
key: yarn-deps-${{ hashFiles('yarn.lock') }}
25+
restore-keys: |
26+
yarn-deps-${{ hashFiles('yarn.lock') }}
27+
28+
- name: Create Release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
run: |
33+
yarn install --frozen-lockfile
34+
yarn build
35+
yarn release

lerna.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"version": "0.3.0-next.0",
33
"npmClient": "yarn",
4-
"packages": [
5-
"packages/*"
6-
],
7-
"useWorkspaces": true
4+
"packages": ["packages/*"],
5+
"useWorkspaces": true,
6+
"command": {
7+
"publish": {
8+
"verifyAccess": false
9+
}
10+
}
811
}

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@
1111
"watch": "lerna run --since HEAD --parallel x -- watch",
1212
"watch-package": "lerna run --scope @*/mini-frame --include-dependencies --parallel x -- watch",
1313
"watch-all": "lerna run --parallel x -- watch",
14-
"storybook": "lerna run --scope storybook start --stream"
14+
"storybook": "lerna run --scope storybook start --stream",
15+
"release": "auto shipit"
1516
},
1617
"devDependencies": {
1718
"auto": "^10.18.4",
1819
"lerna": "^4.0.0"
20+
},
21+
"repository": "code-hike/codehike",
22+
"author": "pomber <[email protected]>",
23+
"auto": {
24+
"plugins": [
25+
"npm",
26+
"released"
27+
],
28+
"onlyPublishWithReleaseLabel": true
1929
}
2030
}

0 commit comments

Comments
 (0)