Skip to content

Commit b1bf3d4

Browse files
committed
fix: Better workflow
1 parent 9f5d129 commit b1bf3d4

File tree

4 files changed

+1855
-1849
lines changed

4 files changed

+1855
-1849
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: react-charts publish
1+
name: react-charts tests
2+
23
on:
34
push:
45
branches:
@@ -8,38 +9,35 @@ on:
89

910
jobs:
1011
test:
11-
name: 'node ${{ matrix.node }} ${{ matrix.os }} '
12-
runs-on: '${{ matrix.os }}'
12+
name: 'Node ${{ matrix.node }}'
13+
runs-on: ubuntu-latest
1314
strategy:
1415
matrix:
15-
os: [ubuntu-latest]
16-
node: [12, 14, 16]
16+
node: [10, 12, 14, 16]
1717
steps:
18-
- uses: actions/setup-node@v1
19-
with:
20-
node-version: ${{ matrix.node }}
2118
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v2
2220
with:
23-
fetch-depth: 1
24-
- run: npm i -g yarn
25-
- run: yarn --frozen-lockfile
21+
node-version: ${{ matrix.node }}
22+
- name: Install dependencies
23+
uses: bahmutov/npm-install@v1
2624
- run: yarn test:ci
2725

2826
publish-module:
2927
name: 'Publish Module to NPM'
30-
# needs: test
31-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' #publish only when merged in master, not on PR
28+
needs: test
29+
# publish only when merged in master on original repo, not on PR
30+
if: github.repository == 'tannerlinsley/react-charts' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta')
3231
runs-on: ubuntu-latest
3332
steps:
3433
- uses: actions/checkout@v2
34+
- uses: actions/setup-node@v2
3535
with:
36-
fetch-depth: 1
37-
- uses: actions/setup-node@v1
38-
with:
39-
node-version: 12
36+
node-version: 14
4037
registry-url: https://registry.npmjs.org/
41-
- run: npm i -g yarn
42-
- run: yarn --frozen-lockfile
38+
- name: Install dependencies
39+
uses: bahmutov/npm-install@v1
40+
- run: yarn build
4341
- run: npx semantic-release@17
4442
env:
4543
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
1-
.cache
2-
.DS_Store
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# builds
8+
types
9+
build
10+
dist
11+
lib
12+
es
13+
artifacts
14+
.rpt2_cache
15+
coverage
16+
*.tgz
17+
18+
# misc
319
.DS_Store
420
.env
5-
.env.development.local
621
.env.local
7-
.env.production.local
22+
.env.development.local
823
.env.test.local
9-
.history
24+
.env.production.local
1025
.next
11-
.rpt2_cache
12-
*.log
13-
artifacts
14-
build
15-
d3/index.js
16-
dist
17-
dist
18-
node_modules
19-
node_modules
26+
2027
npm-debug.log*
21-
size-plugin.json
22-
stats.html
2328
yarn-debug.log*
2429
yarn-error.log*
25-
es
26-
lib
27-
types
30+
.history
31+
size-plugin.json
32+
stats-hydration.json
33+
stats-react.json
34+
stats.html
35+
.vscode/settings.json

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-charts",
33
"version": "1.0.0-semantic-release",
4-
"description": "Hooks for managing, caching and syncing asynchronous and remote data in React",
4+
"description": "Simple, immersive & interactive charts for React. Flexible, declarative, and highly configurable.",
55
"author": "tannerlinsley",
66
"license": "MIT",
77
"repository": "tannerlinsley/react-charts",

0 commit comments

Comments
 (0)