Skip to content

Commit c1b4e98

Browse files
committed
Update CI/CD
1 parent 1dc4c90 commit c1b4e98

File tree

6 files changed

+5606
-79
lines changed

6 files changed

+5606
-79
lines changed

.github/workflows/latest.yml

+7-32
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,14 @@
11
name: Latest
22

3-
on:
3+
on:
44
push:
55
branches:
66
- main
7-
tags-ignore:
8-
- 'v*'
9-
pull_request:
7+
paths-ignore:
8+
- package.json
9+
- package-lock.json
1010

1111
jobs:
12-
verify:
13-
name: Verify
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node: [14, 16]
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v2
21-
- name: Setup
22-
uses: actions/setup-node@v2
23-
with:
24-
node-version: ${{ matrix.node }}
25-
- name: Cache
26-
uses: actions/cache@v2
27-
with:
28-
path: node_modules
29-
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package.json') }}
30-
restore-keys: |
31-
${{ runner.OS }}-npm-cache-
32-
- name: Install
33-
run: npm i
34-
- name: Test
35-
run: npm t
36-
- name: Lint
37-
run: npm run lint
38-
- name: Types
39-
run: npm run types
12+
ci:
13+
uses: vanillaes/.github/.github/workflows/verify.yml@main
14+

.github/workflows/pr.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Pull Request
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
ci:
7+
uses: vanillaes/.github/.github/workflows/verify.yml@main

.github/workflows/release.yml

+12-45
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,15 @@ on:
66
- 'v*'
77

88
jobs:
9-
check:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
node: [14, 16]
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
- name: Setup
18-
uses: actions/setup-node@v2
19-
with:
20-
node-version: ${{ matrix.node }}
21-
- name: Cache
22-
uses: actions/cache@v2
23-
with:
24-
path: node_modules
25-
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package.json') }}
26-
restore-keys: |
27-
${{ runner.OS }}-npm-cache-
28-
- name: Verify
29-
run: |
30-
npm i
31-
npm run preversion
32-
npm:
33-
runs-on: ubuntu-latest
34-
needs: check
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v2
38-
- name: Publish
39-
run: |
40-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
41-
npm publish --access public
42-
gh:
43-
runs-on: ubuntu-latest
44-
needs: check
45-
steps:
46-
- name: Checkout
47-
uses: actions/checkout@v2
48-
- name: Publish
49-
run: |
50-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
51-
ORG="$(echo '${{ github.repository }}' | cut -d'/' -f1)"
52-
echo "registry=https://npm.pkg.github.com/$ORG" > .npmrc
53-
npm publish
9+
ci:
10+
uses: vanillaes/.github/.github/workflows/verify.yml@main
11+
12+
cd-npm:
13+
needs: ci
14+
uses: vanillaes/.github/.github/workflows/npm.yml@main
15+
secrets: inherit
16+
17+
cd-gh:
18+
needs: ci
19+
uses: vanillaes/.github/.github/workflows/gh.yml@main
20+
secrets: inherit

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ node_modules/
22
package/
33
.DS_Store
44
*.tgz
5-
package-lock.json

0 commit comments

Comments
 (0)