Skip to content

Commit 0282684

Browse files
authored
Merge pull request #798 from ReactTooltip/chore/workflows
chore: add github workflows based on the pdeszynski fork
2 parents bb9c79e + 0ded173 commit 0282684

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run basic linting and testing
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v3
12+
13+
- name: Install dev dependencies
14+
run: yarn install
15+
16+
- name: ESLint
17+
run: yarn run eslint
18+
19+
test:
20+
needs: lint
21+
strategy:
22+
matrix:
23+
version: [14, 16, 18]
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.version }}
30+
31+
- name: Install dev dependencies
32+
run: yarn install
33+
34+
- name: Run tests
35+
run: yarn run test

.github/workflows/pull-request.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Pull request workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '!master'
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
uses: ./.github/workflows/lint.yaml

.github/workflows/release.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
lint:
10+
uses: ./.github/workflows/lint.yaml
11+
12+
release:
13+
needs: lint
14+
runs-on: ubuntu-latest
15+
environment: production
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: ${{ matrix.version }}
21+
22+
- name: Install dev dependencies
23+
run: yarn install
24+
25+
- name: Publish package using semantic-release
26+
env:
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
run: |
29+
yarn build
30+
yarn run semantic-release

0 commit comments

Comments
 (0)