Skip to content

Commit

Permalink
Merge pull request #412 from dajiaji/bump-to-1_4_2
Browse files Browse the repository at this point in the history
Bump version to 1.4.2.
  • Loading branch information
dajiaji authored Oct 6, 2024
2 parents 6b5c636 + 866772b commit 1e9ac88
Show file tree
Hide file tree
Showing 33 changed files with 142 additions and 372 deletions.
172 changes: 12 additions & 160 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

jobs:
publish:
publish-to-jsr:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Run deno publish
run: npx jsr publish

publish-common:
publish-to-npm:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -35,194 +35,46 @@ jobs:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/common
- name: Run deno task npm
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
deno task npm
- name: Publish @hpke/common to npm
working-directory: ./npm/packages/common
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-core:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-common
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/core
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/core to npm
working-directory: ./npm/packages/core
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-chacha20poly1305:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/chacha20poly1305
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/chacha20poly1305 to npm
working-directory: ./npm/packages/chacha20poly1305
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkem-x25519:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/dhkem-x25519
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/dhkem-x25519 to npm
working-directory: ./npm/packages/dhkem-x25519
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkem-x448:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/dhkem-x448
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/dhkem-x448 to npm
working-directory: ./npm/packages/dhkem-x448
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-hybridkem-x25519-kyber768:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-dhkem-x25519
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/hybridkem-x25519-kyber768
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/hybridkem-x25519-kyber768 to npm
working-directory: ./npm/packages/hybridkem-x25519-kyber768
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkem-secp256k1:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: publish-dhkem-x25519
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/dhkem-secp256k1
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish @hpke/dhkem-secp256k1 to npm
working-directory: ./npm/packages/dhkem-secp256k1
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-hpke-js:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: [publish-chacha20poly1305, publish-dhkem-x25519, publish-dhkem-x448]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./packages/hpke-js
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
- name: Publish hpke-js to npm
working-directory: ./npm/packages/hpke-js
run: npm publish --provenance
env:
Expand Down
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changes

## Version 1.4.2

Released 2024-10-06

- [(#412) Refine publish workflow for npm packages.](https://github.com/dajiaji/hpke-js/pull/412)
- [(#412) Add @hpke modules to import_map for dnt.](https://github.com/dajiaji/hpke-js/pull/412)
- [(#412) Use npm/import_map for dnt.](https://github.com/dajiaji/hpke-js/pull/412)

## Version 1.4.1

Reverted to 1.3.1 2024-10-06

## Version 1.4.0

Released 2024-10-06
Expand Down
18 changes: 17 additions & 1 deletion npm/import_map.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"imports": {
"@deno/dnt": "jsr:@deno/dnt@^0.41.3"
"@deno/dnt": "jsr:@deno/dnt@^0.41.3",
"@hpke/chacha20poly1305": "npm:@hpke/chacha20poly1305@^1.4.1",
"@hpke/common": "npm:@hpke/common@^1.4.1",
"@hpke/core": "npm:@hpke/core@^1.4.1",
"@hpke/dhkem-x25519": "npm:@hpke/dhkem-x25519@^1.4.1",
"@hpke/dhkem-x448": "npm:@hpke/dhkem-x448@^1.4.1",
"@noble/ciphers/chacha": "npm:@noble/ciphers@^0.5.3/chacha",
"@noble/curves/ed25519": "npm:@noble/curves@^1.4.2/ed25519",
"@noble/curves/ed448": "npm:@noble/curves@^1.4.2/ed448",
"@noble/curves/secp256k1": "npm:@noble/curves@^1.4.2/secp256k1",
"@noble/hashes/hmac": "npm:@noble/hashes@^1.4.0/hmac",
"@noble/hashes/sha256": "npm:@noble/hashes@^1.4.0/sha256",
"@noble/hashes/sha512": "npm:@noble/hashes@^1.4.0/sha512",
"@noble/hashes/sha3": "npm:@noble/hashes@^1.4.0/sha3",
"@std/assert": "jsr:@std/[email protected]",
"@std/path": "jsr:@std/path@^1.0.3",
"@std/testing/bdd": "jsr:@std/testing@^1.0.0/bdd"
}
}
Loading

0 comments on commit 1e9ac88

Please sign in to comment.