Skip to content

Commit bb8e32e

Browse files
authored
Merge pull request #284 from WickrInc/update-dependencies
Add GitHub actions, update dependencies, fix unit tests
2 parents c8a9f8c + 017481c commit bb8e32e

File tree

10 files changed

+1270
-1022
lines changed

10 files changed

+1270
-1022
lines changed

.github/workflows/node-test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
strategy:
15+
matrix:
16+
node-version: [18.x, 20.x, 22.x]
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
- run: npm ci
25+
- run: npm run build
26+
- run: npm test

.github/workflows/npm-publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Node.js Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
- run: npm ci
21+
- run: npm run build
22+
- run: npm test
23+
24+
publish-npm:
25+
needs: build
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
id-token: write
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
registry-url: https://registry.npmjs.org/
36+
- run: npm ci
37+
- run: npm run build
38+
- run: npm publish --provenance
39+
env:
40+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ software.tar.gz
2020
coverage
2121
mysql_move_data.log
2222
mysqld.cnf
23-
.github
2423
.nyc_output
24+
logs/

0 commit comments

Comments
 (0)