Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 132cf56

Browse files
committed
ci: improve ci configuration
1 parent fd7bf82 commit 132cf56

File tree

2 files changed

+44
-43
lines changed

2 files changed

+44
-43
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,58 @@ name: Build & Test Components
55

66
on:
77
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
8+
branches:
9+
- master
10+
paths:
11+
- "packages/**"
1112

1213
jobs:
13-
build:
14+
release:
15+
name: Release
1416
runs-on: ubuntu-latest
1517
strategy:
1618
matrix:
17-
node-version: [12.x]
19+
node-version: 12.x
1820
steps:
19-
- uses: actions/checkout@v2
21+
- name: Checkout Repo
22+
uses: actions/checkout@master
23+
with:
24+
# This makes Actions fetch all Git history
25+
# so that Changesets can generate changelogs with the correct commits
26+
fetch-depth: 0
27+
2028
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@master
2230
with:
2331
node-version: ${{ matrix.node-version }}
24-
- run: yarn
25-
- run: yarn bootstrap
26-
- run: yarn lint
27-
- run: yarn build --if-present
28-
- run: yarn test
32+
33+
- name: Install dependencies
34+
run: yarn
35+
36+
- name: Bootstrap
37+
run: yarn bootstrap
38+
39+
- name: Linting
40+
run: yarn lint
41+
42+
- name: Testing components
43+
run: yarn test
2944
env:
3045
CI: true
31-
release:
32-
name: Release
33-
runs-on: ubuntu-latest
34-
steps:
35-
- name: Checkout Repo
36-
uses: actions/checkout@v1
37-
- name: Setup Node.js
38-
uses: actions/setup-node@v1
39-
with:
40-
node-version: 12
41-
- name: Install Dependencies
42-
run: yarn
43-
- name: Create Release Pull Request
44-
uses: changesets/action@master
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
publish-npm:
48-
needs: build
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v1
52-
- uses: actions/setup-node@v1
53-
with:
54-
node-version: 12
55-
registry-url: https://registry.npmjs.org/
56-
- run: yarn
57-
- run: yarn build
58-
- run: yarn publish-ci
59-
env:
60-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6146

47+
- name: Building packages
48+
run: yarn build --if-present
49+
50+
- name: Setup CI Git User
51+
run: |
52+
git config --global user.email "[email protected]"
53+
git config --global user.name "codebender828"
54+
55+
- name: Publish packages
56+
uses: changesets/action@master
57+
with:
58+
publish: yarn release
59+
commit: "chore(release): version packages"
60+
env:
61+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"test:core": "jest",
3131
"test:module": "yarn workspace @chakra-ui/nuxt test",
3232
"test": "yarn test:core && yarn test:module",
33-
"publish-ci": "changeset publish",
33+
"release": "changeset publish",
3434
"clean": "lerna run clean",
3535
"storybook": "cross-env STORYBOOK_VUE_DEV_TOOLS=1 start-storybook -p 9000",
3636
"storybook:devtools": "vue-devtools",

0 commit comments

Comments
 (0)