Skip to content

Commit d8b7855

Browse files
Add Github Actions
1 parent f9d655c commit d8b7855

File tree

4 files changed

+76
-18
lines changed

4 files changed

+76
-18
lines changed

.github/workflows/main.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 7
21+
22+
- run: pnpm install
23+
24+
- run: pnpm format:check
25+
26+
- run: pnpm lint
27+
28+
- run: pnpm test
29+
30+
- uses: codecov/codecov-action@v3
31+
32+
- run: pnpm build

.github/workflows/publish.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Version and Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
newversion:
7+
description: 'Version'
8+
required: true
9+
10+
concurrency:
11+
group: npm-bump
12+
cancel-in-progress: true
13+
14+
jobs:
15+
version_and_release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
registry-url: 'https://registry.npmjs.org'
26+
27+
- uses: pnpm/action-setup@v2
28+
id: pnpm-install
29+
with:
30+
version: 7
31+
32+
- run: pnpm install
33+
34+
- run: pnpm test
35+
36+
- uses: bcomnes/npm-bump@v2
37+
with:
38+
git_email: [email protected]
39+
git_username: github-actions
40+
newversion: ${{ github.event.inputs.newversion }}
41+
push_version_commit: true
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
npm_token: ${{ secrets.NPM_TOKEN }}

.travis.yml

-17
This file was deleted.

pnpm-lock.yaml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)