Skip to content

Commit

Permalink
Revamp CI (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas authored Aug 19, 2024
1 parent f00df0b commit c6dc4a0
Show file tree
Hide file tree
Showing 9 changed files with 2,945 additions and 2,496 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: CD

on:
release:
Expand All @@ -8,13 +8,17 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: npm test -- --bail --ci
- run: npm run build && npm publish

- run: pnpm install && pnpm test -- --bail --ci

- run: pnpm run build && npm publish --tag v0.3-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: CI

on:
push:
Expand All @@ -13,17 +13,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18, 20]
node: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
cache-dependency-path: yarn.lock
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- run: yarn install && npm test -- --bail --ci
- run: pnpm install && pnpm test -- --bail --ci

- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4

- run: npm run build && npm publish --dry-run --tag v0.3-latest
- run: pnpm run build && npm publish --dry-run --tag v0.3-latest
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

## 0.3.1 ~ 0.3.20

- Revamp tests
- Support Node 18, 20
- Drop Node 10, 12 support
- Bump dependencies
- Update documentation
- Extract constant variables and rename some parameters
- Revamp CI

## 0.3.0

- API change: `encrypt/decrypt` now can take both hex `string` and `Buffer`

## 0.2.0

- API change: use `HKDF-sha256` to derive shared keys instead of `sha256`
- Bump dependencies
- Update documentation

## 0.1.1 ~ 0.1.5

- Bump dependencies
- Update documentation

## 0.1.0

- First beta version release
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 Weiliang Li
Copyright (c) 2019-2024 Weiliang Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 2 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,6 @@ readonly uncompressed: Buffer;
readonly compressed: Buffer;
```

## Release Notes
## Changelog

### 0.3.1 ~ 0.3.19

- Revamp tests
- Support Node 18, 20
- Drop Node 10, 12 support
- Bump dependencies
- Update documentation
- Extract constant variables and rename some parameters

### 0.3.0

- API change: `encrypt/decrypt` now can take both hex `string` and `Buffer`

### 0.2.0

- API change: use `HKDF-sha256` to derive shared keys instead of `sha256`
- Bump dependencies
- Update documentation

### 0.1.1 ~ 0.1.5

- Bump dependencies
- Update documentation

### 0.1.0

- First beta version release
See [CHANGELOG.md](./CHANGELOG.md).
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@
"type": "git",
"url": "git+https://github.com/ecies/js.git"
},
"version": "0.3.19",
"version": "0.3.20",
"dependencies": {
"@types/secp256k1": "^4.0.6",
"futoin-hkdf": "^1.5.3",
"secp256k1": "^5.0.0"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.10.3",
"@types/node-fetch": "^2.6.9",
"https-proxy-agent": "^7.0.2",
"@types/jest": "^29.5.12",
"@types/node": "^22.4.1",
"jest": "^29.7.0",
"node-fetch": "^2.7.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"undici": "^6.19.7"
},
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
"packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247"
}
Loading

0 comments on commit c6dc4a0

Please sign in to comment.