Skip to content

Commit 33dbcae

Browse files
chore: setup test and publish workflows
1 parent d6c0784 commit 33dbcae

File tree

3 files changed

+46
-37
lines changed

3 files changed

+46
-37
lines changed

Diff for: .github/workflows/npm-publish-github-packages.yml

-37
This file was deleted.

Diff for: .github/workflows/publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Publish
3+
4+
on:
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v2
19+
with:
20+
node-version: '16.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
- run: npm ci
23+
- run: npm test
24+
- run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Diff for: .github/workflows/test.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Test
3+
4+
on: [push, pull_request, workflow_call]
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [12, 14, 16]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: npm ci
20+
- run: npm test

0 commit comments

Comments
 (0)