Skip to content

Commit edfa7c8

Browse files
akula-koteswaruduKoteswarudu Akula
andauthored
ci: github pipeline fix (#29)
* changed workflow branch * changed node version in storybook.yml * updated example package * changed branch to main in storybook.yml * added turbo * added release workflow * fixed release workflow * updated branch filter stroybook.yml * merged github release job into publish * changed npm token name Co-authored-by: Koteswarudu Akula <koteswaruduakula@koteswarudu-a.optilink>
1 parent 44da34f commit edfa7c8

File tree

7 files changed

+5674
-144
lines changed

7 files changed

+5674
-144
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name : Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
name: Build and Publish
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: "16.x"
20+
21+
- name: Install and Build Packages
22+
run: |
23+
yarn install
24+
yarn build
25+
26+
- name: Authenticate with Registry
27+
run: |
28+
echo "registry=http://registry.npmjs.org/" >> .npmrc
29+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
30+
env:
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
33+
- name: Publish packages
34+
run: yarn lerna publish from-package --yes
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
39+
- name: Github Release
40+
run: gh release create ${{ github.ref }} --generate-notes
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+

.github/workflows/storybook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
persist-credentials: false
1616
- uses: actions/setup-node@v2
1717
with:
18-
node-version: "12.x"
18+
node-version: "14.x"
1919
- name: Install and Build 🔧
2020
run: | # Install npm packages and build the Storybook files
2121
yarn install

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ cjs
77
coverage
88
package-lock.json
99
.DS_Store
10+
.turbo
1011

1112
# production
12-
/build
13+
**/build
1314
/public
1415
/dist
1516
/packages/**/lib/

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
"bootstrap": "lerna bootstrap",
1111
"prebuild": "npm run clean",
1212
"clean": "lerna exec -- rimraf lib",
13-
"build": "lerna run build",
14-
"dev": "lerna run dev",
13+
"build": "turbo run build",
14+
"dev": "turbo run dev",
1515
"commit": "git-cz",
1616
"storybook": "start-storybook -p 6006",
1717
"build-storybook": "build-storybook -o public -s ./.storybook/images",
18-
"test": "lerna run test",
19-
"lint": "lerna run lint",
18+
"test": "turbo run test",
19+
"lint": "turbo run lint",
2020
"lint:fix": "lerna run lint:fix"
2121
},
2222
"devDependencies": {
@@ -59,6 +59,7 @@
5959
"react": "^16.13.1",
6060
"react-dom": "^16.13.1",
6161
"ts-jest": "^26.3.0",
62+
"turbo": "^1.3.1",
6263
"typescript": "^4.0.2"
6364
},
6465
"command": {

packages/example/package.json

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

turbo.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://turborepo.org/schema.json",
3+
"baseBranch": "origin/main",
4+
"pipeline": {
5+
"build": {
6+
"dependsOn": ["^build"],
7+
"outputs": ["lib/**", "cjs/**", "esm/**"]
8+
},
9+
"test": {
10+
"outputs": []
11+
},
12+
"dev": {
13+
"cache": false
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)